[4/4] pmdinfogen: fix build with gcc 11
diff mbox series

Message ID 20200921133830.1575872-4-ferruh.yigit@intel.com
State Accepted
Delegated to: David Marchand
Headers show
Series
  • [1/4] net/qede: fix build with gcc 11
Related show

Checks

Context Check Description
ci/iol-broadcom-Functional success Functional Testing PASS
ci/travis-robot success Travis build: passed
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Ferruh Yigit Sept. 21, 2020, 1:38 p.m. UTC
Error observed with gcc 11 under development
gcc (GCC) 11.0.0 20200920 (experimental)

build error:
In file included from ../buildtools/pmdinfogen/pmdinfogen.c:17:
../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:
../buildtools/pmdinfogen/pmdinfogen.h:78:1:
	warning: this ‘else’ clause does not guard...
	[-Wmisleading-indentation]
   78 | else \
      | ^~~~
../buildtools/pmdinfogen/pmdinfogen.h:83:35:
	note: in expansion of macro ‘CONVERT_NATIVE’
   83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
      |                                   ^~~~~~~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.c:152:28:
	note: in expansion of macro ‘TO_NATIVE’
  152 |         hdr->e_type      = TO_NATIVE(endian, 16, hdr->e_type);
      |                            ^~~~~~~~~
../buildtools/pmdinfogen/pmdinfogen.h:80:9:
	note: ...this statement, but the latter is misleadingly indented
	as if it were guarded by the ‘else’
   80 |         ___x; \
      |         ^~~~

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 buildtools/pmdinfogen/pmdinfogen.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Marchand Sept. 24, 2020, 9:32 a.m. UTC | #1
On Mon, Sep 21, 2020 at 3:39 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>
> Error observed with gcc 11 under development
> gcc (GCC) 11.0.0 20200920 (experimental)
>
> build error:
> In file included from ../buildtools/pmdinfogen/pmdinfogen.c:17:
> ../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:
> ../buildtools/pmdinfogen/pmdinfogen.h:78:1:
>         warning: this ‘else’ clause does not guard...
>         [-Wmisleading-indentation]
>    78 | else \
>       | ^~~~
> ../buildtools/pmdinfogen/pmdinfogen.h:83:35:
>         note: in expansion of macro ‘CONVERT_NATIVE’
>    83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
>       |                                   ^~~~~~~~~~~~~~
> ../buildtools/pmdinfogen/pmdinfogen.c:152:28:
>         note: in expansion of macro ‘TO_NATIVE’
>   152 |         hdr->e_type      = TO_NATIVE(endian, 16, hdr->e_type);
>       |                            ^~~~~~~~~
> ../buildtools/pmdinfogen/pmdinfogen.h:80:9:
>         note: ...this statement, but the latter is misleadingly indented
>         as if it were guarded by the ‘else’
>    80 |         ___x; \
>       |         ^~~~
>


Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
Cc: stable@dpdk.org

> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  buildtools/pmdinfogen/pmdinfogen.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h
> index 93930e454..38fd3ddcc 100644
> --- a/buildtools/pmdinfogen/pmdinfogen.h
> +++ b/buildtools/pmdinfogen/pmdinfogen.h
> @@ -77,7 +77,7 @@ if ((fend) == ELFDATA2LSB) \
>         ___x = le##width##toh(x); \
>  else \
>         ___x = be##width##toh(x); \
> -       ___x; \
> +___x; \
>  })
>
>  #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
> --
> 2.26.2
>

Reviewed-by: David Marchand <david.marchand@redhat.com>
David Marchand Oct. 8, 2020, 10:48 a.m. UTC | #2
On Thu, Sep 24, 2020 at 11:32 AM David Marchand
<david.marchand@redhat.com> wrote:
> On Mon, Sep 21, 2020 at 3:39 PM Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> >
> > Error observed with gcc 11 under development
> > gcc (GCC) 11.0.0 20200920 (experimental)
> >
> > build error:
> > In file included from ../buildtools/pmdinfogen/pmdinfogen.c:17:
> > ../buildtools/pmdinfogen/pmdinfogen.c: In function ‘parse_elf’:
> > ../buildtools/pmdinfogen/pmdinfogen.h:78:1:
> >         warning: this ‘else’ clause does not guard...
> >         [-Wmisleading-indentation]
> >    78 | else \
> >       | ^~~~
> > ../buildtools/pmdinfogen/pmdinfogen.h:83:35:
> >         note: in expansion of macro ‘CONVERT_NATIVE’
> >    83 | #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)
> >       |                                   ^~~~~~~~~~~~~~
> > ../buildtools/pmdinfogen/pmdinfogen.c:152:28:
> >         note: in expansion of macro ‘TO_NATIVE’
> >   152 |         hdr->e_type      = TO_NATIVE(endian, 16, hdr->e_type);
> >       |                            ^~~~~~~~~
> > ../buildtools/pmdinfogen/pmdinfogen.h:80:9:
> >         note: ...this statement, but the latter is misleadingly indented
> >         as if it were guarded by the ‘else’
> >    80 |         ___x; \
> >       |         ^~~~
> >
>
>
> Fixes: 98b0fdb0ffc6 ("pmdinfogen: add buildtools and pmdinfogen utility")
> Cc: stable@dpdk.org
>
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> Reviewed-by: David Marchand <david.marchand@redhat.com>

Applied, thanks.

Patch
diff mbox series

diff --git a/buildtools/pmdinfogen/pmdinfogen.h b/buildtools/pmdinfogen/pmdinfogen.h
index 93930e454..38fd3ddcc 100644
--- a/buildtools/pmdinfogen/pmdinfogen.h
+++ b/buildtools/pmdinfogen/pmdinfogen.h
@@ -77,7 +77,7 @@  if ((fend) == ELFDATA2LSB) \
 	___x = le##width##toh(x); \
 else \
 	___x = be##width##toh(x); \
-	___x; \
+___x; \
 })
 
 #define TO_NATIVE(fend, width, x) CONVERT_NATIVE(fend, width, x)