mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-08 17:40:32 +01:00
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:
parent
6cd5cc595f
commit
da7cc97f5e
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue