[Pkg-gnupg-commit] [gnupg2] 09/160: tests/gpgscm: Handle unhandled enumeration values.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Jul 15 09:36:31 UTC 2016
This is an automated email from the git hooks/post-receive script.
dkg pushed a commit to branch upstream
in repository gnupg2.
commit 133f25703a47e9bbc28c4532934f405ecdeb2de0
Author: Justus Winter <justus at g10code.com>
Date: Thu Jan 7 14:07:20 2016 +0100
tests/gpgscm: Handle unhandled enumeration values.
* tests/gpgscm/scheme.c (opexe_{3,4}): Handle unhandled enumeration
values in the opcode dispatching code.
Signed-off-by: Justus Winter <justus at g10code.com>
---
tests/gpgscm/scheme.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/tests/gpgscm/scheme.c b/tests/gpgscm/scheme.c
index 3d4330d..220eed3 100644
--- a/tests/gpgscm/scheme.c
+++ b/tests/gpgscm/scheme.c
@@ -27,6 +27,7 @@
# include <math.h>
#endif
+#include <assert.h>
#include <limits.h>
#include <float.h>
#include <ctype.h>
@@ -3654,6 +3655,7 @@ static pointer opexe_3(scheme *sc, enum scheme_opcodes op) {
case OP_GRE: comp_func=num_gt; break;
case OP_LEQ: comp_func=num_le; break;
case OP_GEQ: comp_func=num_ge; break;
+ default: assert (! "reached");
}
x=sc->args;
v=nvalue(car(x));
@@ -3898,12 +3900,15 @@ static pointer opexe_4(scheme *sc, enum scheme_opcodes op) {
case OP_OPEN_INFILE: prop=port_input; break;
case OP_OPEN_OUTFILE: prop=port_output; break;
case OP_OPEN_INOUTFILE: prop=port_input|port_output; break;
+ default: assert (! "reached");
}
p=port_from_filename(sc,strvalue(car(sc->args)),prop);
if(p==sc->NIL) {
s_return(sc,sc->F);
}
s_return(sc,p);
+ break;
+ default: assert (! "reached");
}
#if USE_STRING_PORTS
@@ -3914,6 +3919,7 @@ static pointer opexe_4(scheme *sc, enum scheme_opcodes op) {
switch(op) {
case OP_OPEN_INSTRING: prop=port_input; break;
case OP_OPEN_INOUTSTRING: prop=port_input|port_output; break;
+ default: assert (! "reached");
}
p=port_from_string(sc, strvalue(car(sc->args)),
strvalue(car(sc->args))+strlength(car(sc->args)), prop);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git
More information about the Pkg-gnupg-commit
mailing list