summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Drake <michael.drake@codethink.co.uk>2017-03-22 14:51:48 (GMT)
committer Michael Drake <michael.drake@codethink.co.uk>2017-03-22 15:02:01 (GMT)
commit632a75e6c2a965d984c1495750bfca47931cec94 (patch)
tree428e0825d592fa0880e3addbfa49ce15897bdd90
parent343df77dedb346425c40e6a364ad639c73e92527 (diff)
downloadnsgenbind-632a75e6c2a965d984c1495750bfca47931cec94.tar.gz
nsgenbind-632a75e6c2a965d984c1495750bfca47931cec94.tar.bz2
Duktape 2.X: duk_error now returns a duk_ret_t
https://github.com/svaarala/duktape/blob/master/doc/release-notes-v2-0.rst#duk_error-duk_error_va-duk_throw-duk_fatal-have-a-return-value This change suppress warnings about ignoring the return value. However, it looks like we should be returning error in these cases rather than continuing. I'll do that in a separate commit.
-rw-r--r--src/duk-libdom-interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/duk-libdom-interface.c b/src/duk-libdom-interface.c
index 6746348..5b15164 100644
--- a/src/duk-libdom-interface.c
+++ b/src/duk-libdom-interface.c
@@ -1025,7 +1025,7 @@ output_operation_argument_type_check(
case WEBIDL_TYPE_BOOL:
fprintf(outf,
"\t\tif (!duk_is_boolean(ctx, %d)) {\n"
- "\t\t\tduk_error(ctx, DUK_ERR_ERROR, %s_error_fmt_bool_type, %d, \"%s\");\n"
+ "\t\t\t(void) duk_error(ctx, DUK_ERR_ERROR, %s_error_fmt_bool_type, %d, \"%s\");\n"
"\t\t}\n", argidx, DLPFX, argidx, argumente->name);
break;
@@ -1036,7 +1036,7 @@ output_operation_argument_type_check(
case WEBIDL_TYPE_LONGLONG:
fprintf(outf,
"\t\tif (!duk_is_number(ctx, %d)) {\n"
- "\t\t\tduk_error(ctx, DUK_ERR_ERROR, %s_error_fmt_number_type, %d, \"%s\");\n"
+ "\t\t\t(void) duk_error(ctx, DUK_ERR_ERROR, %s_error_fmt_number_type, %d, \"%s\");\n"
"\t\t}\n", argidx, DLPFX, argidx, argumente->name);
break;
@@ -1106,7 +1106,7 @@ output_interface_operation(FILE* outf,
fprintf(outf,
"if (%s_argc < %d) {\n"
"\t\t/* not enough arguments */\n"
- "\t\tduk_error(ctx, DUK_RET_TYPE_ERROR, %s_error_fmt_argument, %d, %s_argc);\n"
+ "\t\t(void) duk_error(ctx, DUK_RET_TYPE_ERROR, %s_error_fmt_argument, %d, %s_argc);\n"
"\t} else ",
DLPFX,
fixedargc,