libfdt: Warnings of signed/unsigned comparison

Jan Kiszka jan.kiszka at
Mon Aug 17 10:35:33 CEST 2020

Hi all,

enabling binman pulls in libfdt, and that seems to have a lot of issues 
with comparing signed with unsigned values. Those are present upstream 
as well (dtc in general doesn't build with -Wsign-compare).

Is anyone looking into this already? Fix upstream? Can we ignore this 
downstream for the time being?

diff --git a/scripts/dtc/libfdt/Makefile.libfdt b/scripts/dtc/libfdt/Makefile.libfdt
index e54639738c..b88b21c920 100644
--- a/scripts/dtc/libfdt/Makefile.libfdt
+++ b/scripts/dtc/libfdt/Makefile.libfdt
@@ -12,6 +12,8 @@ LIBFDT_SRCS = fdt.c fdt_ro.c fdt_wip.c fdt_sw.c fdt_rw.c fdt_strerror.c fdt_empt
+HOSTCFLAGS += -Wno-sign-compare
 	@$(VECHO) CLEAN "(libfdt)"
 	rm -f $(STD_CLEANFILES:%=$(LIBFDT_dir)/%)


Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

More information about the U-Boot mailing list