mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
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:
parent
04cf1fdc0f
commit
e1147b159e
5 changed files with 14 additions and 14 deletions
4
data.c
4
data.c
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue