From ce6323d4dfb6a28ac3cc88010fe28c07e58cba6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20Klime=C5=A1?= Date: Fri, 12 Dec 2014 22:11:48 +0100 Subject: [PATCH] tests: mute coverity INFINITE_LOOP error Error: INFINITE_LOOP (CWE-835): [#def17] NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:93: loop_top: Top of the loop. NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:94: loop_bottom: Bottom of the loop. NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:93: loop_condition: If "notified" is initially true then it will remain true. Error: INFINITE_LOOP (CWE-835): [#def18] NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:191: loop_top: Top of the loop. NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:192: loop_bottom: Bottom of the loop. NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:191: loop_condition: If "result & NOTIFY_MASK" is initially true then it will remain true. NetworkManager-0.9.11.0/libnm/tests/test-nm-client.c:191: loop_condition: If "result & SIGNAL_MASK" is initially true then it will remain true. --- libnm/tests/test-nm-client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libnm/tests/test-nm-client.c b/libnm/tests/test-nm-client.c index 48b16b469..3541c741e 100644 --- a/libnm/tests/test-nm-client.c +++ b/libnm/tests/test-nm-client.c @@ -90,6 +90,7 @@ test_device_added (void) /* Tell the test service to add a new device */ nm_test_service_add_device (sinfo, client, "AddWiredDevice", "eth0"); + /* coverity[loop_condition] */ while (!notified) g_main_context_iteration (NULL, TRUE); @@ -188,6 +189,7 @@ test_device_added_signal_after_init (void) /* Ensure the 'device-added' signal doesn't show up before * the 'Devices' property change notification */ + /* coverity[loop_condition] */ while (!(result & SIGNAL_MASK) && !(result & NOTIFY_MASK)) g_main_context_iteration (NULL, TRUE);