mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-04-21 00:40:46 +02:00
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",
^
(cherry picked from commit fe765d30da)
This commit is contained in:
parent
2b621ef5dd
commit
688183c96c
1 changed files with 1 additions and 1 deletions
|
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue