Commit 1f8bc1f1 authored by Marco Trevisan's avatar Marco Trevisan 🎺 Committed by Philip Chimento

arg: Ignore compiler warning on un-initialized value

We're quite sure we do, otherwise we'd have already returned false but
g++ isn't smart enough to catch it, when building with release optimizations.
parent f1871d2a
......@@ -748,7 +748,16 @@ gjs_object_to_g_hash(JSContext *context,
#if __GNUC__ >= 8 // clang-format off
_Pragma("GCC diagnostic push")
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
// The compiler isn't smart enough to figure out that key_ptr will
// always be initialized if value_to_ghashtable_key() returns true.
g_hash_table_insert(result, key_ptr, val_ptr);
#if __GNUC__ >= 8
_Pragma("GCC diagnostic pop")
#endif // clang-format on
*hash_p = result.release();
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment