diff --git a/src/duk_api_stack.c b/src/duk_api_stack.c index 25e18ab6..241261f4 100644 --- a/src/duk_api_stack.c +++ b/src/duk_api_stack.c @@ -106,9 +106,9 @@ DUK_LOCAL duk_int_t duk__api_coerce_d2i(duk_context *ctx, duk_idx_t index, duk_b if (require) { DUK_ERROR(thr, DUK_ERR_TYPE_ERROR, DUK_STR_NOT_NUMBER); - } else { - return 0; + /* not reachable */ } + return 0; } DUK_LOCAL duk_uint_t duk__api_coerce_d2ui(duk_context *ctx, duk_idx_t index, duk_bool_t require) { @@ -163,9 +163,9 @@ DUK_LOCAL duk_uint_t duk__api_coerce_d2ui(duk_context *ctx, duk_idx_t index, duk if (require) { DUK_ERROR(thr, DUK_ERR_TYPE_ERROR, DUK_STR_NOT_NUMBER); - } else { - return 0; + /* not reachable */ } + return 0; } /* diff --git a/src/duk_bi_buffer.c b/src/duk_bi_buffer.c index b623d579..37e9680e 100644 --- a/src/duk_bi_buffer.c +++ b/src/duk_bi_buffer.c @@ -171,6 +171,7 @@ DUK_LOCAL duk_hbufferobject *duk__require_bufobj_value(duk_context *ctx, duk_idx } DUK_ERROR(thr, DUK_ERR_TYPE_ERROR, DUK_STR_NOT_BUFFER); + return NULL; /* not reachable */ } #endif /* DUK_USE_BUFFEROBJECT_SUPPORT */