test: fix build with GCC 11
GCC 11 complains that 'a' is uninitialized. ../dpdk/app/test/test_prefetch.c: In function 'test_prefetch': ../dpdk/app/test/test_prefetch.c:25:9: error: 'a' may be used uninitialized [-Werror=maybe-uninitialized] 25 | rte_prefetch0(&a); | ^~~~~~~~~~~~~~~~~ Fix by initializing 'a'. Bugzilla ID: 714 Fixes: af75078fece3 ("first public release") Cc: stable@dpdk.org Reported-by: Ali Alnubani <alialnu@nvidia.com> Signed-off-by: Kevin Traynor <ktraynor@redhat.com> Tested-by: Ali Alnubani <alialnu@nvidia.com> Reviewed-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
parent
e32b525aae
commit
50eea2bfa7
@ -20,7 +20,7 @@
|
||||
static int
|
||||
test_prefetch(void)
|
||||
{
|
||||
int a;
|
||||
int a = 0;
|
||||
|
||||
rte_prefetch0(&a);
|
||||
rte_prefetch1(&a);
|
||||
|
Loading…
x
Reference in New Issue
Block a user