pmdinfogen: fix build with gcc 11
authorFerruh Yigit <ferruh.yigit@intel.com>
Mon, 21 Sep 2020 13:38:30 +0000 (14:38 +0100)
committerDavid Marchand <david.marchand@redhat.com>
Thu, 8 Oct 2020 10:45:54 +0000 (12:45 +0200)
commit5a75cc3c88143496030b5bed76bd031ddbe9e355
treea30b6080d045239a4b9231c7ac3182f8c1cfe83b
parent62aa0e8c6693bb5656b5a9ad5c5248fce9150ee3
pmdinfogen: fix build with gcc 11

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>
buildtools/pmdinfogen/pmdinfogen.h