Skip to content

Commit

Permalink
h8300:let the checker know that size_t is ulong
Browse files Browse the repository at this point in the history
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 <luc.vanoostenryck@gmail.com>
Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp>
  • Loading branch information
Luc Van Oostenryck authored and Yoshinori Sato committed Aug 22, 2018
1 parent 9819d4e commit 1b803a3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/h8300/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1b803a3

Please sign in to comment.