1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2026-01-08 19:44:06 +00:00

Moved pragma to satisfy some toolchains

This commit is contained in:
Bryan Roe
2019-01-18 15:52:58 -08:00
parent f65a5935dd
commit 694108d245

View File

@@ -59,6 +59,11 @@ void ILibDuktape_Push_ObjectStash(duk_context *ctx)
duk_put_prop_string(ctx, -3, ILibDuktape_ObjectStashKey); // [obj][stash]
}
}
#ifdef _POSIX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
#endif
duk_ret_t ILibDuktape_Error(duk_context *ctx, char *format, ...)
{
char dest[4096];
@@ -70,17 +75,14 @@ duk_ret_t ILibDuktape_Error(duk_context *ctx, char *format, ...)
va_end(argptr);
duk_push_string(ctx, dest);
#ifdef _POSIX
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-value"
#endif
duk_throw(ctx);
return DUK_RET_ERROR;
}
#ifdef _POSIX
#pragma GCC diagnostic pop
#endif
return DUK_RET_ERROR;
}
int Duktape_GetBooleanProperty(duk_context *ctx, duk_idx_t i, char *propertyName, int defaultValue)
{
int retVal = defaultValue;