mirror of
git://git.gnupg.org/gnupg.git
synced 2025-02-01 16:33:02 +01:00
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@g10code.com>
This commit is contained in:
parent
cb989504cd
commit
133f25703a
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user