diff options
author | Andre Przywara <andre.przywara@arm.com> | 2020-10-12 17:19:39 +0100 |
---|---|---|
committer | David Gibson <david@gibson.dropbear.id.au> | 2020-10-13 15:48:40 +1100 |
commit | 04cf1fdc0fcf471c2e77376101bda65f727b3812 (patch) | |
tree | fb5880b647f348e584bbdac1ee0308a8c062bc09 /convert-dtsv0-lexer.l | |
parent | b30013edb878a0e4fbe7235f38d8fd6e644479e5 (diff) | |
download | dtc-04cf1fdc0fcf471c2e77376101bda65f727b3812.zip dtc-04cf1fdc0fcf471c2e77376101bda65f727b3812.tar.gz dtc-04cf1fdc0fcf471c2e77376101bda65f727b3812.tar.bz2 |
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 <andre.przywara@arm.com>
Message-Id: <20201012161948.23994-3-andre.przywara@arm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'convert-dtsv0-lexer.l')
-rw-r--r-- | convert-dtsv0-lexer.l | 2 |
1 files changed, 1 insertions, 1 deletions
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 { <INITIAL>[0-9a-fA-F]+ { unsigned long long val; int obase = 16, width = 0; - int i; + unsigned int i; val = strtoull(yytext, NULL, cbase); |