]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix compile time warning building gold with Clang-14.
authorNick Clifton <nickc@redhat.com>
Wed, 18 May 2022 15:29:57 +0000 (16:29 +0100)
committerNick Clifton <nickc@redhat.com>
Wed, 18 May 2022 15:29:57 +0000 (16:29 +0100)
* int_encoding.cc (get_length_as_unsigned_LEB_128): Remove
current_length variable.

gold/ChangeLog
gold/int_encoding.cc

index e2f62999cfe4e561523556395f28d06de20ffa38..5103dab7b67083792da263bcd58f44d325bfdc83 100644 (file)
@@ -1,3 +1,8 @@
+2022-05-18  Nick Clifton  <nickc@redhat.com>
+
+       * int_encoding.cc (get_length_as_unsigned_LEB_128): Remove
+       current_length variable.
+
 2022-02-17  Nick Clifton  <nickc@redhat.com>
 
        * po/sr.po: Updated Serbian translation.
index d27b2af4c2198861daff435a67802d7d9d954b82..196e0b3b50911faf56bb86fd840c1a0a7f6fdff5 100644 (file)
@@ -119,12 +119,7 @@ get_length_as_unsigned_LEB_128(uint64_t value)
   size_t length = 0;
   do
     {
-      unsigned char current_byte = value & 0x7f;
       value >>= 7;
-      if (value != 0)
-        {
-          current_byte |= 0x80;
-        }
       length++;
     }
   while (value != 0);