girepository: Ignore set-but-not-used warnings with G_DISABLE_ASSERT

This fixes some compiler warnings when building with
`-Dglib_assert=false`.

See https://gitlab.gnome.org/GNOME/glib/-/jobs/3294022

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall
2023-11-14 10:36:51 +00:00
parent 24776cb5bd
commit d00bbf94a6
3 changed files with 9 additions and 0 deletions

View File

@@ -152,7 +152,9 @@ gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint3
guint16 *table;
GHashTableIter hashiter;
gpointer key, value;
#ifndef G_DISABLE_ASSERT
guint32 num_elts;
#endif
guint8 *packed_mem;
g_return_if_fail (builder != NULL);
@@ -170,7 +172,9 @@ gi_typelib_hash_builder_pack (GITypelibHashBuilder *builder, guint8* mem, guint3
table = (guint16*) (mem + builder->dirmap_offset);
#ifndef G_DISABLE_ASSERT
num_elts = g_hash_table_size (builder->strings);
#endif
g_hash_table_iter_init (&hashiter, builder->strings);
while (g_hash_table_iter_next (&hashiter, &key, &value))
{