summaryrefslogtreecommitdiff
path: root/flattree.c
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2021-06-11 18:10:37 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2021-06-15 12:48:25 +1000
commit5bec74a6d13519381a40b5433ede7849a75a8d79 (patch)
treedcd05551805dbe75ef3c63acebe95dd509e2fc51 /flattree.c
parent24e7f511fd4acaf48d25374f88dbdbdb277e6a26 (diff)
downloaddevice-tree-compiler-5bec74a6d13519381a40b5433ede7849a75a8d79.tar.gz
dtc: Fix signedness comparisons warnings: reservednum
With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in code using the "reservednum" variable. There is obviously little sense in having a negative number of reserved memory entries, so let's make this variable and all its users unsigned. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Message-Id: <20210611171040.25524-6-andre.przywara@arm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'flattree.c')
-rw-r--r--flattree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/flattree.c b/flattree.c
index 4659afb..3d0204f 100644
--- a/flattree.c
+++ b/flattree.c
@@ -295,7 +295,7 @@ static struct data flatten_reserve_list(struct reserve_info *reservelist,
{
struct reserve_info *re;
struct data d = empty_data;
- int j;
+ unsigned int j;
for (re = reservelist; re; re = re->next) {
d = data_append_re(d, re->address, re->size);