libnm/tests: avoid invalid compiler warning about uninitialized variable

make[5]: Entering directory './NetworkManager/libnm-core/tests'
    CC       test-general.o
  test-general.c: In function ‘test_g_hash_table_get_keys_as_array’:
  test-general.c:4552:69: error: ‘length’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
  test-general.c:4543:8: note: ‘length’ was declared here
    guint length;
          ^
This commit is contained in:
Thomas Haller 2015-10-31 10:12:53 +01:00
parent 6cd5cc595f
commit da7cc97f5e

View file

@ -4540,7 +4540,7 @@ static void
test_g_hash_table_get_keys_as_array (void)
{
GHashTable *table = g_hash_table_new (g_str_hash, g_str_equal);
guint length;
guint length = 0;
char **keys;
g_hash_table_insert (table, "one", "1");