]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
libdw: Change typeof -> __typeof in memory-access.h
authorYonggang Luo <luoyonggang@gmail.com>
Thu, 20 Oct 2022 18:25:52 +0000 (02:25 +0800)
committerMark Wielaard <mark@klomp.org>
Mon, 12 Dec 2022 13:07:56 +0000 (14:07 +0100)
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
libdw/ChangeLog
libdw/memory-access.h

index 6cbf192d0248b9a4ab450ec130f1da3a5fe6d6d6..019c6580d59b456adf38e3dca4ca7c26c46aff73 100644 (file)
@@ -1,3 +1,10 @@
+2022-10-21  Yonggang Luo  <luoyonggang@gmail.com>
+
+       * memory-access.h (get_uleb128_step): Use __typeof.
+       (get_sleb128_step): Likewise.
+       (__libdw_get_sleb128) Likewise.
+       (__libdw_get_sleb128_unchecked): Likewise.
+
 2022-11-03  Mark Wielaard  <mark@klomp.org>
 
        * dwarf_next_cfi.c (dwarf_next_cfi): Don't dereference and assign
index 16c8c851783a25a28f20b93a99d3d506a0e51eff..fca4129afe1560b06c562bc027a4009bb92909d5 100644 (file)
@@ -64,7 +64,7 @@ __libdw_max_len_sleb128 (const unsigned char *addr, const unsigned char *end)
 #define get_uleb128_step(var, addr, nth)                                     \
   do {                                                                       \
     unsigned char __b = *(addr)++;                                           \
-    (var) |= (typeof (var)) (__b & 0x7f) << ((nth) * 7);                     \
+    (var) |= (__typeof (var)) (__b & 0x7f) << ((nth) * 7);                   \
     if (likely ((__b & 0x80) == 0))                                          \
       return (var);                                                          \
   } while (0)
@@ -112,11 +112,11 @@ __libdw_get_uleb128_unchecked (const unsigned char **addrp)
 #define get_sleb128_step(var, addr, nth)                                     \
   do {                                                                       \
     unsigned char __b = *(addr)++;                                           \
-    (var) |= (typeof (var)) (__b & 0x7f) << ((nth) * 7);                     \
+    (var) |= (__typeof (var)) (__b & 0x7f) << ((nth) * 7);                   \
     if (likely ((__b & 0x80) == 0))                                          \
       {                                                                              \
        if ((__b & 0x40) != 0)                                                \
-         (var) |= - ((typeof (var)) 1 << (((nth) + 1) * 7));                 \
+         (var) |= - ((__typeof (var)) 1 << (((nth) + 1) * 7));               \
        return (var);                                                         \
       }                                                                              \
   } while (0)
@@ -146,7 +146,7 @@ __libdw_get_sleb128 (const unsigned char **addrp, const unsigned char *end)
     {
       /* We only need the low bit of the final byte, and as it is the
         sign bit, we don't need to do anything else here.  */
-      acc |= ((typeof (acc)) b) << 7 * max;
+      acc |= ((__typeof (acc)) b) << 7 * max;
       return acc;
     }
 
@@ -179,7 +179,7 @@ __libdw_get_sleb128_unchecked (const unsigned char **addrp)
     {
       /* We only need the low bit of the final byte, and as it is the
         sign bit, we don't need to do anything else here.  */
-      acc |= ((typeof (acc)) b) << 7 * max;
+      acc |= ((__typeof (acc)) b) << 7 * max;
       return acc;
     }