From 2a89fa9613ccc2464e9d196f2e03488c13bd7241 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Wed, 18 May 2022 16:29:57 +0100 Subject: [PATCH] Fix compile time warning building gold with Clang-14. * int_encoding.cc (get_length_as_unsigned_LEB_128): Remove current_length variable. --- 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 + + * int_encoding.cc (get_length_as_unsigned_LEB_128): Remove + current_length variable. + 2022-02-17 Nick Clifton * 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); -- 2.30.2