eal: remove use of 'register' keyword
PATCH 1/1 eal: remove use of 'register' keyword
The 'register' keyword does nothing, and has been removed in C++17.
Remove it for compatibility.
Signed-off-by Avi Kivity <[email protected]>
--- lib/librte_eal/common/include/arch/arm/rte_byteorder.h | 2 +- lib/librte_eal/common/include/arch/x86/rte_byteorder.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
lib/librte_eal/common/include/arch/arm/rte_byteorder.h +1 -1
@@ -48,11 +48,11 @@ extern "C" {/* fix missing __builtin_bswap16 for gcc older then 4.8 */ #if !(__GNUC__ >4 || (__GNUC__ ==4 && __GNUC_MINOR__ >=8 ))static inline uint16_t rte_arch_bswap16 (uint16_t _x) { - registeruint16_t x = _x; +uint16_t x = _x; asmvolatile ("rev16 %w0,%w1" :"=r" (x) :"r" (x) );
lib/librte_eal/common/include/arch/x86/rte_byteorder.h +2 -2
@@ -22,11 +22,11 @@ extern "C" {* * Do not use this function directly. The preferred function is rte_bswap16(). */ static inline uint16_t rte_arch_bswap16 (uint16_t _x) { - registeruint16_t x = _x; +uint16_t x = _x; asmvolatile ("xchgb %b[x1],%h[x2]" : [x1]"=Q" (x) : [x2]"0" (x) );return x;
@@ -37,11 +37,11 @@ static inline uint16_t rte_arch_bswap16(uint16_t _x)* * Do not use this function directly. The preferred function is rte_bswap32(). */ static inline uint32_t rte_arch_bswap32 (uint32_t _x) { - registeruint32_t x = _x; +uint32_t x = _x; asmvolatile ("bswap %[x]" : [x]"+r" (x) );return x; }
Signature · 1 line
2.14.3
Thomas Monjalon
Applied09/01/2018 17:11, Avi Kivity:
Quoted 5 lines
The 'register' keyword does nothing, and has been removed in C++17.
Remove it for compatibility.
Signed-off-by Avi Kivity <[email protected]>
Applied, thanks