mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-27 14:36:16 +01:00
Merge branch 'backport-4291-gvariant-analyzer-glib-2-82' into 'glib-2-82'
Backport !4291 “glib/gvariant: Fix check for G_ANALYZER_ANALYZING” to glib-2-82 See merge request GNOME/glib!4306
This commit is contained in:
commit
41e92f4bdb
@ -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