From f038d31b6c0de159fcc0e1d284ded872cd5c5fbf Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Wed, 30 Jan 2002 22:38:56 +0000 Subject: [PATCH] 2002-01-30 Daniel Jacobowitz From Neil Booth : * gdb.base/bitfields.c: Correct assignments to bitfields to avoid warnings. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/bitfields.c | 26 +++++++++++++------------- 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c4c0fd98511..dd64a3094ce 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2002-01-30 Daniel Jacobowitz + + From Neil Booth : + * gdb.base/bitfields.c: Correct assignments to bitfields to avoid + warnings. + 2002-01-21 Fred Fish * gdb.base/restore.exp (restore_tests): Fix obvious typo, callee diff --git a/gdb/testsuite/gdb.base/bitfields.c b/gdb/testsuite/gdb.base/bitfields.c index 3e6b2e63d3f..bd411f7b647 100644 --- a/gdb/testsuite/gdb.base/bitfields.c +++ b/gdb/testsuite/gdb.base/bitfields.c @@ -80,7 +80,7 @@ int main () break1 (); flags.uc = 0; - flags.s1 = 1; + flags.s1 = -1; break1 (); flags.s1 = 0; @@ -131,10 +131,10 @@ int main () flags.u3 = 0; flags.u9 = 0; - flags.s1 = 0x1; - flags.s2 = 0x3; - flags.s3 = 0x7; - flags.s9 = 0x1FF; + flags.s1 = -1; + flags.s2 = -1; + flags.s3 = -1; + flags.s9 = -1; flags.sc = 0xFF; break2 (); flags.s1 = 0; @@ -169,20 +169,20 @@ int main () break4 (); /* Maximally negative values */ - flags.s1 = 0x1; - flags.s2 = 0x2; - flags.s3 = 0x4; - flags.s9 = 0x100; + flags.s1 = -0x1; + flags.s2 = -0x2; + flags.s3 = -0x4; + flags.s9 = -0x100; /* Extract bitfield value so that bitfield.exp can check if the target understands signed bitfields. */ i = flags.s9; break4 (); /* -1 */ - flags.s1 = 0x1; - flags.s2 = 0x3; - flags.s3 = 0x7; - flags.s9 = 0x1FF; + flags.s1 = -1; + flags.s2 = -1; + flags.s3 = -1; + flags.s9 = -1; break4 (); flags.s1 = 0; -- 2.30.2