[COMMITTED] elf: Fix tunconf.c build with clang

Adhemerval Zanella <[email protected]>
Newsgroups gmane.comp.lib.glibc.alpha
Message-ID <[email protected]>
clang enables -Wsingle-bit-bitfield-constant-conversion with -Werror
and it triggers:

tunconf.c:338:32: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion]
  338 |       entry->value_is_negative = 1;

Change both value_is_negative and value_was_parsed to unsigned.

Checked on x86_64-linux-gnu and i686-linux-gnu.
---
 elf/tunconf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/elf/tunconf.c b/elf/tunconf.c
index c27b50b1de0..d4b2e541b53 100644
--- a/elf/tunconf.c
+++ b/elf/tunconf.c
@@ -66,8 +66,8 @@ struct tunable_entry_int {
   bool exclude_secure:1;
   bool exclude_nonsecure:1;
   int tunable_id;
-  int value_is_negative:1;
-  int value_was_parsed:1;
+  unsigned int value_is_negative:1;
+  unsigned int value_was_parsed:1;
   unsigned long long value_ull;
   signed long long value_sll;
   long filter_flags;
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.