From 832bfad7451e2e7bd23c96edff2be050905ac3f6 Mon Sep 17 00:00:00 2001 From: Andre Przywara Date: Fri, 16 Oct 2020 15:42:50 +0100 Subject: libfdt: Fix signedness comparison warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a combination of upstream libfdt commits to fix warnings about comparing signed and unsigned integers: ========== scripts/dtc/libfdt/fdt.c: In function ‘fdt_offset_ptr’: scripts/dtc/libfdt/fdt.c:137:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if ((absoffset < offset) ... ========== For a detailed description of the fixes, see the dtc repo: https://git.kernel.org/pub/scm/utils/dtc/dtc.git/log/?id=73e0f143b73d808 For this patch the commits between 73e0f143b73d8088 and ca19c3db2bf62000 have been combined and adjusted for the slight differences in U-Boot's libfdt code base. Signed-off-by: Andre Przywara --- scripts/dtc/libfdt/fdt_wip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/dtc/libfdt/fdt_wip.c') diff --git a/scripts/dtc/libfdt/fdt_wip.c b/scripts/dtc/libfdt/fdt_wip.c index f64139e0b3d..c2d7566a67d 100644 --- a/scripts/dtc/libfdt/fdt_wip.c +++ b/scripts/dtc/libfdt/fdt_wip.c @@ -23,7 +23,7 @@ int fdt_setprop_inplace_namelen_partial(void *fdt, int nodeoffset, if (!propval) return proplen; - if (proplen < (len + idx)) + if ((unsigned)proplen < (len + idx)) return -FDT_ERR_NOSPACE; memcpy((char *)propval + idx, val, len); -- cgit v1.2.3