eal: remove use of register keyword
authorAvi Kivity <avi@scylladb.com>
Tue, 9 Jan 2018 16:11:08 +0000 (18:11 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 11 Jan 2018 23:37:07 +0000 (00:37 +0100)
The 'register' keyword does nothing, and has been removed in C++17.

Remove it for compatibility.

Signed-off-by: Avi Kivity <avi@scylladb.com>
lib/librte_eal/common/include/arch/arm/rte_byteorder.h
lib/librte_eal/common/include/arch/x86/rte_byteorder.h

index 0a29f4b..8af0a39 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
 
 static inline uint16_t rte_arch_bswap16(uint16_t _x)
 {
-       register uint16_t x = _x;
+       uint16_t x = _x;
 
        asm volatile ("rev16 %w0,%w1"
                      : "=r" (x)
index 1b8ed5f..56b0a31 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
  */
 static inline uint16_t rte_arch_bswap16(uint16_t _x)
 {
-       register uint16_t x = _x;
+       uint16_t x = _x;
        asm volatile ("xchgb %b[x1],%h[x2]"
                      : [x1] "=Q" (x)
                      : [x2] "0" (x)
@@ -39,7 +39,7 @@ static inline uint16_t rte_arch_bswap16(uint16_t _x)
  */
 static inline uint32_t rte_arch_bswap32(uint32_t _x)
 {
-       register uint32_t x = _x;
+       uint32_t x = _x;
        asm volatile ("bswap %[x]"
                      : [x] "+r" (x)
                      );