diff options
author | Thomas Haller <thaller@redhat.com> | 2021-01-08 19:06:30 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-01-08 19:06:44 +0100 |
commit | 7c6adf80326491a4f5b3b12fa921fe32ba57052f (patch) | |
tree | 91f94917fd4e3c82f9513fc8302aedffec01a1e4 | |
parent | 395273d20d2310e60f629af47335a64fbcbc895f (diff) | |
download | NetworkManager-7c6adf80326491a4f5b3b12fa921fe32ba57052f.tar.gz |
clients: fix compiler warning in _do_test_parse_passwd_file()
Since "_i" is int type and G_N_ELEMENTS() is size_t, the compiler
can warn
error: comparison of unsigned expression in '< 0' is always false [-Werror=type-limits]
Avoid the warning by casting.
-rw-r--r-- | clients/common/tests/test-clients-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clients/common/tests/test-clients-common.c b/clients/common/tests/test-clients-common.c index 51830f9e84..7020e83339 100644 --- a/clients/common/tests/test-clients-common.c +++ b/clients/common/tests/test-clients-common.c @@ -300,7 +300,7 @@ test_client_import_wireguard_missing(void) g_assert_cmpint(-1, ==, *_p_error_line); \ g_assert(!_local); \ \ - for (_i = 0; _i < G_N_ELEMENTS(_values); _i++) { \ + for (_i = 0; _i < (int) G_N_ELEMENTS(_values); _i++) { \ const NMUtilsNamedValue *_n = &_values[_i]; \ const char * _v; \ \ |