summaryrefslogtreecommitdiff
path: root/livetree.c
diff options
context:
space:
mode:
author Andre Przywara <andre.przywara@arm.com> 2020-10-12 17:19:43 +0100
committer David Gibson <david@gibson.dropbear.id.au> 2020-10-13 15:56:53 +1100
commite1147b159e9209e1c3102f350445ba9927048b4d (patch)
tree7a0a4d903b1e3fdfca097f46890b66d2ebc3d4ea /livetree.c
parent04cf1fdc0fcf471c2e77376101bda65f727b3812 (diff)
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>
Diffstat (limited to 'livetree.c')
-rw-r--r--livetree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/livetree.c b/livetree.c
index 032df58..7eacd02 100644
--- a/livetree.c
+++ b/livetree.c
@@ -438,7 +438,7 @@ cell_t propval_cell(struct property *prop)
return fdt32_to_cpu(*((fdt32_t *)prop->val.val));
}
-cell_t propval_cell_n(struct property *prop, int n)
+cell_t propval_cell_n(struct property *prop, unsigned int n)
{
assert(prop->val.len / sizeof(cell_t) >= n);
return fdt32_to_cpu(*((fdt32_t *)prop->val.val + n));