[binutils-gdb] Fix compile time warning building gold with Clang-14.
Nick Clifton
nickc@sourceware.org
Wed May 18 15:30:26 GMT 2022
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2a89fa9613ccc2464e9d196f2e03488c13bd7241
commit 2a89fa9613ccc2464e9d196f2e03488c13bd7241
Author: Nick Clifton <nickc@redhat.com>
Date: Wed May 18 16:29:57 2022 +0100
Fix compile time warning building gold with Clang-14.
* int_encoding.cc (get_length_as_unsigned_LEB_128): Remove
current_length variable.
Diff:
---
gold/ChangeLog | 5 +++++
gold/int_encoding.cc | 5 -----
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/gold/ChangeLog b/gold/ChangeLog
index e2f62999cfe..5103dab7b67 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -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.
diff --git a/gold/int_encoding.cc b/gold/int_encoding.cc
index d27b2af4c21..196e0b3b509 100644
--- a/gold/int_encoding.cc
+++ b/gold/int_encoding.cc
@@ -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);
More information about the Binutils-cvs
mailing list