From: Victor Julien Date: Fri, 5 Aug 2022 15:10:54 +0000 (+0200) Subject: flow: minor compiler warnings X-Git-Tag: suricata-7.0.0-beta1~316 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fec07b87d5e3e8641f76ae36d2cafd2a38384aa;p=thirdparty%2Fsuricata.git flow: minor compiler warnings flow-util.c: In function 'FlowEndCountersRegister': flow-util.c:294:34: warning: 'name' may be used uninitialized in this function [-Wmaybe-uninitialized] 294 | fec->flow_tcp_state[i] = StatsRegisterCounter(name, t); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- diff --git a/src/flow-util.c b/src/flow-util.c index 91c14eb3eb..5caf60fc9b 100644 --- a/src/flow-util.c +++ b/src/flow-util.c @@ -265,7 +265,7 @@ void FlowEndCountersRegister(ThreadVars *t, FlowEndCounters *fec) } for (enum TcpState i = TCP_NONE; i <= TCP_CLOSED; i++) { - const char *name; + const char *name = NULL; switch (i) { case TCP_NONE: name = "flow.end.tcp_state.none";