DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] test/prefetch: fix build with GCC 11
@ 2021-05-20 11:06 Kevin Traynor
  2021-05-20 11:14 ` Ali Alnubani
  2021-05-20 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Traynor @ 2021-05-20 11:06 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit, Kevin Traynor, stable, Ali Alnubani

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>
---
 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [PATCH] test/prefetch: fix build with GCC 11
  2021-05-20 11:06 [dpdk-dev] [PATCH] test/prefetch: fix build with GCC 11 Kevin Traynor
@ 2021-05-20 11:14 ` Ali Alnubani
  2021-05-20 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
  1 sibling, 0 replies; 4+ messages in thread
From: Ali Alnubani @ 2021-05-20 11:14 UTC (permalink / raw)
  To: Kevin Traynor, dev; +Cc: ferruh.yigit, stable

> -----Original Message-----
> From: Kevin Traynor <ktraynor@redhat.com>
> Sent: Thursday, May 20, 2021 2:06 PM
> To: dev@dpdk.org
> Cc: ferruh.yigit@intel.com; Kevin Traynor <ktraynor@redhat.com>;
> stable@dpdk.org; Ali Alnubani <alialnu@nvidia.com>
> Subject: [PATCH] test/prefetch: 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>
> ---
>  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

Was about to send a fix 😊.
Thank you Kevin.

Build is now passing.
Tested-by: Ali Alnubani <alialnu@nvidia.com>

- Ali

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/prefetch: fix build with GCC 11
  2021-05-20 11:06 [dpdk-dev] [PATCH] test/prefetch: fix build with GCC 11 Kevin Traynor
  2021-05-20 11:14 ` Ali Alnubani
@ 2021-05-20 14:31 ` David Marchand
  2021-05-20 21:06   ` Thomas Monjalon
  1 sibling, 1 reply; 4+ messages in thread
From: David Marchand @ 2021-05-20 14:31 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: dev, Yigit, Ferruh, dpdk stable, Ali Alnubani

On Thu, May 20, 2021 at 1:07 PM Kevin Traynor <ktraynor@redhat.com> wrote:
>
> 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>

Reviewed-by: David Marchand <david.marchand@redhat.com>

-- 
David Marchand


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [dpdk-stable] [PATCH] test/prefetch: fix build with GCC 11
  2021-05-20 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
@ 2021-05-20 21:06   ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2021-05-20 21:06 UTC (permalink / raw)
  To: Kevin Traynor; +Cc: stable, dev, Yigit, Ferruh, Ali Alnubani, David Marchand

20/05/2021 16:31, David Marchand:
> On Thu, May 20, 2021 at 1:07 PM Kevin Traynor <ktraynor@redhat.com> wrote:
> >
> > 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>
> 
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-05-20 21:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 11:06 [dpdk-dev] [PATCH] test/prefetch: fix build with GCC 11 Kevin Traynor
2021-05-20 11:14 ` Ali Alnubani
2021-05-20 14:31 ` [dpdk-dev] [dpdk-stable] " David Marchand
2021-05-20 21:06   ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).