eal: fix C++17 compilation
authorStephen Hemminger <stephen@networkplumber.org>
Fri, 8 May 2020 23:25:05 +0000 (16:25 -0700)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 18 May 2020 18:46:24 +0000 (20:46 +0200)
commit3a2cd6fd069e26410810df6c2ec81d283bb6fbaa
treea20712086bbfd317d0dd206ee9a39831a4f94739
parent05a38d7c759ef2e8b76f23377e4baf9e95060b15
eal: fix C++17 compilation

Compiling a C++ application that includes directly or indirectly
rte_common.h will cause a warning:

include/rte_common.h:350:37: warning: ISO C++17 does not allow
  â€˜register’ storage class specifier [-Wregister]
 rte_combine32ms1b(register uint32_t x)

C++ is pickier than standard C and flags this antique usage.

The register keyword is an old K&R legacy and should be removed
everywhere in DPDK. For now, fix it where it hurts.

Fixes: 08f683174e94 ("eal: add functions for previous power of 2 alignment")
Cc: stable@dpdk.org
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/include/rte_common.h