From: Luc Van Oostenryck Date: Wed, 30 May 2018 21:03:43 +0000 (+0200) Subject: h8300:let the checker know that size_t is ulong X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1b803a357d520164404c6262710049b09b93ed5a;p=openwrt%2Fstaging%2Fblogic.git h8300:let the checker know that size_t is ulong All 64bit archs use unsigned long for size_t and most 32bit archs use 'unsigned int'. By default, this is what is assumed by sparse. However, on h8300 (a 32bit arch) size_t is unsigned long which can led sparse to emit wrong warnings. Fix this by passing to sparse the flag -msize-long, telling it that size_t is unsigned long. Signed-off-by: Luc Van Oostenryck Signed-off-by: Yoshinori Sato --- diff --git a/arch/h8300/Makefile b/arch/h8300/Makefile index e1c02ca230cb..eaac6685fe89 100644 --- a/arch/h8300/Makefile +++ b/arch/h8300/Makefile @@ -22,6 +22,8 @@ KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\" KBUILD_AFLAGS += $(aflags-y) LDFLAGS += $(ldflags-y) +CHECKFLAGS += -msize-long + ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := h8300-unknown-linux- endif