From 04cf1fdc0fcf471c2e77376101bda65f727b3812 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Mon, 12 Oct 2020 17:19:39 +0100 Subject: convert-dtsv0: Fix signedness comparisons warning With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in the generated lexer code. In this case we walk over an array, and never use negative indicies, so we can change the loop counter variable to be unsigned. This fixes "make convert-dtsv0", when compiled with -Wsign-compare. Signed-off-by: Andre Przywara Message-Id: <20201012161948.23994-3-andre.przywara@arm.com> Signed-off-by: David Gibson --- convert-dtsv0-lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'convert-dtsv0-lexer.l') diff --git a/convert-dtsv0-lexer.l b/convert-dtsv0-lexer.l index f52e8a1..7a66f57 100644 --- a/convert-dtsv0-lexer.l +++ b/convert-dtsv0-lexer.l @@ -94,7 +94,7 @@ static const struct { [0-9a-fA-F]+ { unsigned long long val; int obase = 16, width = 0; - int i; + unsigned int i; val = strtoull(yytext, NULL, cbase); -- cgit v1.1