mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02:00
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:
@@ -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))
|
||||
{
|
||||
|
Reference in New Issue
Block a user