glib/gvariant: Fix check for G_ANALYZER_ANALYZING

This is _always_ defined in gmacros.h and therefore the #ifdef will always
be 1 even if were disabled. Just #if instead.

Closes: #3480
This commit is contained in:
Christian Hergert 2024-09-23 11:09:10 -07:00
parent 84b6f747cb
commit 049149c4b7

View File

@ -3504,7 +3504,7 @@ g_variant_builder_init (GVariantBuilder *builder,
g_assert_not_reached (); g_assert_not_reached ();
} }
#ifdef G_ANALYZER_ANALYZING #if G_ANALYZER_ANALYZING
/* Static analysers cant couple the code in g_variant_builder_init() to the /* Static analysers cant couple the code in g_variant_builder_init() to the
* code in g_variant_builder_end() by GVariantType, so end up assuming that * code in g_variant_builder_end() by GVariantType, so end up assuming that
* @offset and @children mismatch and that uninitialised memory is accessed * @offset and @children mismatch and that uninitialised memory is accessed