diff options
author | Philip Withnall <philip@tecnocode.co.uk> | 2017-02-08 15:53:01 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-02-08 16:53:01 +0100 |
commit | 6a909d41e1835a77ff65fe93002245faaaf6047a (patch) | |
tree | 7a684c43b65c84982168d27d681628107eef7d5f /src | |
parent | 8a50cf6957f12dbb1f90411659da9b959a1983ff (diff) |
test: Fix a maybe-uninitialised compiler warning (#5269)
The compiler warning is a false positive, since n_addresses is always
initialised on the success path from parse_argv(), but the compiler
obviously can’t work that out.
Fixes:
src/test/test-nss.c:426:9: warning: 'n_addresses' may be used uninitialized in this function [-Wmaybe-uninitialized]
Diffstat (limited to 'src')
-rw-r--r-- | src/test/test-nss.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-nss.c b/src/test/test-nss.c index 4ccfe75147..b59cb7aa69 100644 --- a/src/test/test-nss.c +++ b/src/test/test-nss.c @@ -511,7 +511,7 @@ int main(int argc, char **argv) { _cleanup_free_ char *dir = NULL; _cleanup_strv_free_ char **modules = NULL, **names = NULL; _cleanup_free_ struct local_address *addresses = NULL; - int n_addresses; + int n_addresses = 0; char **module; int r; |