numam-dpdk/examples/ipsec-secgw
Kevin Traynor f8afd29247 examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning
gcc 10.0.1 reports:

../examples/ipsec-secgw/ipsec_process.c: In function ‘ipsec_process’:
../examples/ipsec-secgw/ipsec_process.c:132:34:
error: ‘grp.m’ may be used uninitialized in this function
 [-Werror=maybe-uninitialized]
  132 |    grp[n].cnt = pkts + i - grp[n].m;
      |                            ~~~~~~^~

This is a correct warning for the initial execution of the statement.
However, it is the design of the loop that grp[0].cnt will later be
written with the correct value using an initialized grp[0].m before it
is used.

In order to remove the warning, initialize grp[0].m for the initial and
unused calculation of grp[0].cnt.

Fixes: 3e5f4625dc ("examples/ipsec-secgw: make data-path to use IPsec library")
Cc: stable@dpdk.org

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Kevin Traynor <ktraynor@redhat.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2020-05-06 11:18:36 +02:00
..
test examples/ipsec-secgw: enable CPU crypto fallback 2020-04-05 18:38:51 +02:00
ep0.cfg examples/ipsec-secgw: support flow director 2020-04-19 17:15:14 +02:00
ep1.cfg examples/ipsec-secgw: fix default configuration 2019-11-20 12:35:51 +01:00
esp.c examples/ipsec-secgw: support fallback session 2019-11-08 13:51:16 +01:00
esp.h examples: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
event_helper.c examples/ipsec-secgw: check event adapter errors 2020-04-19 17:15:14 +02:00
event_helper.h examples/ipsec-secgw: add event mode 2020-04-05 18:26:04 +02:00
ipip.h examples/ipsec-secgw: update incremental checksum 2018-01-20 16:10:52 +01:00
ipsec_process.c examples/ipsec-gw: fix gcc 10 maybe-uninitialized warning 2020-05-06 11:18:36 +02:00
ipsec_worker.c examples/ipsec-secgw: remove duplicated check 2020-04-19 17:15:14 +02:00
ipsec_worker.h examples/ipsec-secgw: add app mode worker 2020-04-05 18:26:04 +02:00
ipsec-secgw.c examples/ipsec-secgw: support flow director 2020-04-19 17:15:14 +02:00
ipsec-secgw.h examples/ipsec-secgw: add app mode worker 2020-04-05 18:26:04 +02:00
ipsec.c examples/ipsec-secgw: support flow director 2020-04-19 17:15:14 +02:00
ipsec.h examples/ipsec-secgw: support flow director 2020-04-19 17:15:14 +02:00
Makefile examples/ipsec-secgw: add driver mode worker 2020-04-05 18:26:04 +02:00
meson.build examples/ipsec-secgw: add driver mode worker 2020-04-05 18:26:04 +02:00
parser.c examples/ipsec-secgw: get rid of maximum SP limitation 2020-02-05 15:20:51 +01:00
parser.h examples/ipsec-secgw: get rid of maximum SP limitation 2020-02-05 15:20:51 +01:00
rt.c examples: use SPDX tag for Intel copyright files 2018-01-04 22:41:39 +01:00
sa.c examples/ipsec-secgw: support flow director 2020-04-19 17:15:14 +02:00
sad.c examples/ipsec-secgw: add SAD cache 2020-02-05 15:20:51 +01:00
sad.h examples/ipsec-secgw: add event mode 2020-04-05 18:26:04 +02:00
sp4.c examples/ipsec-secgw: get rid of maximum SP limitation 2020-02-05 15:20:51 +01:00
sp6.c examples/ipsec-secgw: get rid of maximum SP limitation 2020-02-05 15:20:51 +01:00