aboutsummaryrefslogtreecommitdiff
path: root/libfdt
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2020-09-21 17:52:51 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2020-09-23 21:50:17 +1000
commit0c43d4d7bf5a3a2e83d2005daf1e44ea5bd7f069 (patch)
tree5112114b313d5a088b838fab925c7120090515a9 /libfdt
parent442ea3dd157906ce23df8001095562d3492a471c (diff)
downloaddtc-0c43d4d7bf5a3a2e83d2005daf1e44ea5bd7f069.zip
dtc-0c43d4d7bf5a3a2e83d2005daf1e44ea5bd7f069.tar.gz
dtc-0c43d4d7bf5a3a2e83d2005daf1e44ea5bd7f069.tar.bz2
libfdt: fdt_mem_rsv(): Fix comparison warnings
With -Wsign-compare, compilers warn about a mismatching signedness in comparisons in fdt_mem_rsv(). Since all involved values must be positive, change the used types to be unsigned. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Message-Id: <20200921165303.9115-3-andre.przywara@arm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'libfdt')
-rw-r--r--libfdt/fdt_ro.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libfdt/fdt_ro.c b/libfdt/fdt_ro.c
index e03570a..3c8d143 100644
--- a/libfdt/fdt_ro.c
+++ b/libfdt/fdt_ro.c
@@ -157,8 +157,8 @@ int fdt_generate_phandle(const void *fdt, uint32_t *phandle)
static const struct fdt_reserve_entry *fdt_mem_rsv(const void *fdt, int n)
{
- int offset = n * sizeof(struct fdt_reserve_entry);
- int absoffset = fdt_off_mem_rsvmap(fdt) + offset;
+ unsigned int offset = n * sizeof(struct fdt_reserve_entry);
+ unsigned int absoffset = fdt_off_mem_rsvmap(fdt) + offset;
if (!can_assume(VALID_INPUT)) {
if (absoffset < fdt_off_mem_rsvmap(fdt))