mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 06:56:14 +01:00
Merge branch 'wip/chergert/fix-ganalyzer-use' into 'main'
glib/gvariant: Fix check for G_ANALYZER_ANALYZING Closes #3480 See merge request GNOME/glib!4291
This commit is contained in:
commit
267342420f
@ -187,7 +187,7 @@ name_unref (Name *name)
|
||||
* So, until the static analysis improves, or we find some way to restructure
|
||||
* the code, squash the false positive use-after-free or double-unref warnings
|
||||
* by making this function a no-op to the static analyser. */
|
||||
#ifndef G_ANALYZER_ANALYZING
|
||||
#if !G_ANALYZER_ANALYZING
|
||||
g_assert (name->refcount > 0);
|
||||
if (--name->refcount == 0)
|
||||
{
|
||||
|
@ -3504,7 +3504,7 @@ g_variant_builder_init (GVariantBuilder *builder,
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
#ifdef G_ANALYZER_ANALYZING
|
||||
#if G_ANALYZER_ANALYZING
|
||||
/* Static analysers can’t couple the code in g_variant_builder_init() to the
|
||||
* code in g_variant_builder_end() by GVariantType, so end up assuming that
|
||||
* @offset and @children mismatch and that uninitialised memory is accessed
|
||||
|
Loading…
Reference in New Issue
Block a user