Browse Source

trivial compile warning fixes

pull/1/head
Sami Vaarala 11 years ago
parent
commit
4f59dc24c6
  1. 4
      src/duk_api.c
  2. 2
      src/duk_builtin_error.c

4
src/duk_api.c

@ -2813,13 +2813,17 @@ static int duk_push_error_object_vsprintf(duk_context *ctx, int err_code, const
int retval;
duk_hobject *errobj;
duk_hobject *proto;
#ifdef DUK_USE_AUGMENT_ERRORS
int noblame_fileline;
#endif
DUK_ASSERT(ctx != NULL);
DUK_ASSERT(thr != NULL);
/* Error code also packs a tracedata related flag. */
#ifdef DUK_USE_AUGMENT_ERRORS
noblame_fileline = err_code & DUK_ERRCODE_FLAG_NOBLAME_FILELINE;
#endif
err_code = err_code & (~DUK_ERRCODE_FLAG_NOBLAME_FILELINE);
retval = duk_push_object_helper(ctx,

2
src/duk_builtin_error.c

@ -15,6 +15,8 @@ int duk_builtin_error_constructor_shared(duk_context *ctx) {
duk_hthread *thr = (duk_hthread *) ctx;
int bidx_prototype = duk_get_magic(ctx);
DUK_UNREF(thr);
/* same for both error and each subclass like TypeError */
int flags_and_class = DUK_HOBJECT_FLAG_EXTENSIBLE |
DUK_HOBJECT_CLASS_AS_FLAGS(DUK_HOBJECT_CLASS_ERROR);

Loading…
Cancel
Save