From: Andre Przywara <[email protected]>

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 <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: David Gibson <[email protected]>
---
 cpukit/dtc/libfdt/fdt_ro.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/dtc/libfdt/fdt_ro.c b/cpukit/dtc/libfdt/fdt_ro.c
index e03570a56e..3c8d143db2 100644
--- a/cpukit/dtc/libfdt/fdt_ro.c
+++ b/cpukit/dtc/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))
-- 
2.31.1

_______________________________________________
devel mailing list
[email protected]
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to