From 4f59dc24c687dc5f1e471ee6ceac88c2df25310a Mon Sep 17 00:00:00 2001 From: Sami Vaarala Date: Sat, 7 Dec 2013 17:55:22 +0200 Subject: [PATCH] trivial compile warning fixes --- src/duk_api.c | 4 ++++ src/duk_builtin_error.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/src/duk_api.c b/src/duk_api.c index 757954a0..9b3bbacf 100644 --- a/src/duk_api.c +++ b/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, diff --git a/src/duk_builtin_error.c b/src/duk_builtin_error.c index 7242741a..2501dc74 100644 --- a/src/duk_builtin_error.c +++ b/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);