* [PATCH] linearize.h: fix some 'selfcheck' warnings
@ 2021-02-26 23:28 Ramsay Jones
2021-02-28 21:33 ` Luc Van Oostenryck
0 siblings, 1 reply; 2+ messages in thread
From: Ramsay Jones @ 2021-02-26 23:28 UTC (permalink / raw)
To: Luc Van Oostenryck; +Cc: Sparse Mailing-list
Commits 34c57a7f ("asm-mem: does it clobber memory?", 2021-02-20) and
d6721b38 ("asm-mem: does it output to memory?", 2021-02-20) both add
a single bit bitfield to the 'struct asm' part of the union contained
within the 'struct instruction'. This causes the 'selfcheck' target
to issue several 'dubious one-bit signed bitfield' errors.
In order to suppress these errors, change the type of the bitfields to
an unsigned type.
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
linearize.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/linearize.h b/linearize.h
index cf0cf066..01ee656c 100644
--- a/linearize.h
+++ b/linearize.h
@@ -150,8 +150,8 @@ struct instruction {
struct /* asm */ {
const char *string;
struct asm_rules *asm_rules;
- int clobber_memory:1;
- int output_memory:1;
+ unsigned int clobber_memory:1;
+ unsigned int output_memory:1;
};
};
};
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] linearize.h: fix some 'selfcheck' warnings
2021-02-26 23:28 [PATCH] linearize.h: fix some 'selfcheck' warnings Ramsay Jones
@ 2021-02-28 21:33 ` Luc Van Oostenryck
0 siblings, 0 replies; 2+ messages in thread
From: Luc Van Oostenryck @ 2021-02-28 21:33 UTC (permalink / raw)
To: Ramsay Jones; +Cc: Sparse Mailing-list
On Fri, Feb 26, 2021 at 11:28:43PM +0000, Ramsay Jones wrote:
>
> Commits 34c57a7f ("asm-mem: does it clobber memory?", 2021-02-20) and
> d6721b38 ("asm-mem: does it output to memory?", 2021-02-20) both add
> a single bit bitfield to the 'struct asm' part of the union contained
> within the 'struct instruction'. This causes the 'selfcheck' target
> to issue several 'dubious one-bit signed bitfield' errors.
>
> In order to suppress these errors, change the type of the bitfields to
> an unsigned type.
Thank you,
-- Luc
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-02-28 21:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-26 23:28 [PATCH] linearize.h: fix some 'selfcheck' warnings Ramsay Jones
2021-02-28 21:33 ` Luc Van Oostenryck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).