summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2021-01-13 13:23:10 +0100
committerThomas Haller <thaller@redhat.com>2021-01-13 13:23:12 +0100
commitcd754680a6a0e35b286d4157269053ccc3996a32 (patch)
treec838f17e85fa136f721ef6d9ff60c989de013b9f
parent9bef4ece925cf6f8ea3bcc7f581e7c34662b77fb (diff)
downloadNetworkManager-cd754680a6a0e35b286d4157269053ccc3996a32.tar.gz
src/tests: avoid "-Wmaybe-uninitialized" warning in nmtstp_acd_defender_new()
With gcc-10.2.1-9.fc33.s390x we get a (false positive) warning: src/platform/tests/test-common.c: In function nmtstp_acd_defender_new: src/platform/tests/test-common.c:2688:15: error: probe may be used uninitialized in this function [-Werror=maybe-uninitialized] 2688 | *defender = (NMTstpAcdDefender){ | ^ src/platform/tests/test-common.c:2656:56: note: probe was declared here 2656 | NAcdProbe * probe; | ^
-rw-r--r--src/platform/tests/test-common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c
index 6014204371..4e08b282b0 100644
--- a/src/platform/tests/test-common.c
+++ b/src/platform/tests/test-common.c
@@ -2653,7 +2653,7 @@ nmtstp_acd_defender_new(int ifindex, in_addr_t ip_addr, const NMEtherAddr *mac_a
nm_auto(n_acd_config_freep) NAcdConfig * config = NULL;
nm_auto(n_acd_unrefp) NAcd * nacd = NULL;
nm_auto(n_acd_probe_config_freep) NAcdProbeConfig *probe_config = NULL;
- NAcdProbe * probe;
+ NAcdProbe * probe = NULL;
int fd;
int r;
char sbuf_addr[NM_UTILS_INET_ADDRSTRLEN];