dtc: Fix signedness comparisons warnings: change types

With -Wsign-compare, compilers warn about a mismatching signedness in
comparisons in various parts of dtc.

Many variables are using signed types unnecessarily, as we never use
negative value in them.
Change their types to be unsigned, to prevent issues with comparisons.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Message-Id: <20201012161948.23994-7-andre.przywara@arm.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
Andre Przywara 2020-10-12 17:19:43 +01:00 committed by David Gibson
parent 04cf1fdc0f
commit e1147b159e
5 changed files with 14 additions and 14 deletions

4
data.c
View file

@ -21,10 +21,10 @@ void data_free(struct data d)
free(d.val);
}
struct data data_grow_for(struct data d, int xlen)
struct data data_grow_for(struct data d, unsigned int xlen)
{
struct data nd;
int newsize;
unsigned int newsize;
if (xlen == 0)
return d;