diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-05-25 16:15:55 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2015-05-25 16:15:55 +0200 |
commit | 066ce3990a7009a75319463d9fc7d1e9f90d6748 (patch) | |
tree | d6a1ff13656a5d5b6dff47c779fa7c7f5e333207 | |
parent | 58ed063c719524ae24e22a23b20c81b6595cd080 (diff) | |
download | NetworkManager-066ce3990a7009a75319463d9fc7d1e9f90d6748.tar.gz |
ifnet/tests: fix GCC 5 warning about possible misuse of logical not
With GCC 5, -Wlogical-not-parentheses is enabled by -Wall and warns
about suspicious code like:
int a;
...
if (!a > 1) { ... }
Fix the following warning:
test_all.c: In function ‘test_is_static’:
test_all.c:114:32: warning: logical not is only applied to the left hand side of comparison [-Wlogical-not-parentheses]
ASSERT (!is_static_ip6 ("eth0") == TRUE, "is static",
^
-rw-r--r-- | src/settings/plugins/ifnet/tests/test_all.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/settings/plugins/ifnet/tests/test_all.c b/src/settings/plugins/ifnet/tests/test_all.c index 76ed0c7d62..55e7e283e5 100644 --- a/src/settings/plugins/ifnet/tests/test_all.c +++ b/src/settings/plugins/ifnet/tests/test_all.c @@ -111,7 +111,7 @@ test_is_static (void) "a dhcp interface is recognized as static"); ASSERT (is_static_ip4 ("eth0") == TRUE, "is static", "a static interface is recognized as dhcp"); - ASSERT (!is_static_ip6 ("eth0") == TRUE, "is static", + ASSERT (is_static_ip6 ("eth0") == FALSE, "is static", "a dhcp interface is recognized as static"); } |