[dpdk-dev] [PATCH] test/prefetch: fix build with GCC 11
Kevin Traynor
ktraynor at redhat.com
Thu May 20 13:06:12 CEST 2021
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 at dpdk.org
Reported-by: Ali Alnubani <alialnu at nvidia.com>
Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
app/test/test_prefetch.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/test/test_prefetch.c b/app/test/test_prefetch.c
index 5489885b51..7b4a8e4144 100644
--- a/app/test/test_prefetch.c
+++ b/app/test/test_prefetch.c
@@ -21,5 +21,5 @@ static int
test_prefetch(void)
{
- int a;
+ int a = 0;
rte_prefetch0(&a);
--
2.31.1
More information about the dev
mailing list