All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sparse: Make struct token::special signed
@ 2014-12-23 13:16 Rasmus Villemoes
  2014-12-23 19:01 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Rasmus Villemoes @ 2014-12-23 13:16 UTC (permalink / raw)
  To: linux-sparse, Christopher Li; +Cc: Rasmus Villemoes

There doesn't seem to be any reason for the special member of struct
token to be unsigned; AFAICT it is only ever being directly compared
to explicit characters and the SPECIAL_* enum constants using ==, !=
and in a switch statement. Making it plain int avoids an annoying
warning from match_op in token.h when compiling with -Wsign-compare.

Signed-off-by: Rasmus Villemoes <rv@rasmusvillemoes.dk>
---
 token.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/token.h b/token.h
index 8dbd80f..69d95d7 100644
--- a/token.h
+++ b/token.h
@@ -187,7 +187,7 @@ struct token {
 	union {
 		const char *number;
 		struct ident *ident;
-		unsigned int special;
+		int special;
 		struct string *string;
 		int argnum;
 		struct argcount count;
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-24 11:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-23 13:16 [PATCH] sparse: Make struct token::special signed Rasmus Villemoes
2014-12-23 19:01 ` Linus Torvalds
2014-12-24  5:01   ` Benjamin Herrenschmidt
2014-12-24 11:07     ` Rasmus Villemoes

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.