[EXT] [PATCH v2] test/crypto: fix warnings for optimization=1 build

Akhil Goyal gakhil at marvell.com
Wed Jun 15 17:08:45 CEST 2022


> Fail IPSec ESN and antireplay cases, if there are no packets. Fixes
> following warning when using optimization=1 build flag with GCC 11.
> 
> ../app/test/test_cryptodev.c: In function ‘test_ipsec_pkt_replay’:
> ../app/test/test_cryptodev.c:10074:15: warning: ‘td_outb’ may be used
> uninitialized [-Wmaybe-uninitialized]
>          ret = test_ipsec_proto_process(td_outb, td_inb, nb_pkts, true,
>                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>                                         &flags);
>                                         ~~~~~~~
> ../app/test/test_cryptodev.c:9150:1: note: by argument 1 of type ‘const struct
> ipsec_test_data[]’ to ‘test_ipsec_proto_process’ declared here
>  test_ipsec_proto_process(const struct ipsec_test_data td[],
>  ^~~~~~~~~~~~~~~~~~~~~~~~
> ../app/test/test_cryptodev.c:10056:32: note: ‘td_outb’ declared here
>          struct ipsec_test_data td_outb[IPSEC_TEST_PACKETS_MAX];
>                                 ^~~~~~~
> 
> Bugzilla ID: 1032
> Fixes: d02c6bfcb99a ("test/crypto: add ESN and antireplay cases")
> Cc: stable at dpdk.org
> 
> Reported-by: Daxue Gao <daxuex.gao at intel.com>
> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy at chelsio.com>
Applied to dpdk-next-crypto

Thanks.


More information about the stable mailing list