From 6bc8606be389aeb6e3a3f245b36de7b7ad11e9cb Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Mon, 12 Feb 2018 00:20:08 +0000 Subject: config.mak.uname: remove SPARSE_FLAGS setting for cygwin Since commit f66450ae9 ("cygwin: Remove the Win32 l/stat() implementation", 2013-06-22), the cygwin build has not used the WIN32 API/header files. This means that the '-isystem /usr/include/w32api' option to sparse is no longer necessary (to allow sparse to find the WIN32 header files). In addition, the '-Wno-one-bit-signed-bitfield' option can be removed, since the warning suppressed by that option was only provoked by a WIN32 header file. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- config.mak.uname | 1 - 1 file changed, 1 deletion(-) diff --git a/config.mak.uname b/config.mak.uname index 685a80d138..6a1d0de0cc 100644 --- a/config.mak.uname +++ b/config.mak.uname @@ -182,7 +182,6 @@ ifeq ($(uname_O),Cygwin) NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease X = .exe UNRELIABLE_FSTAT = UnfortunatelyYes - SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo MMAP_PREVENTS_DELETE = UnfortunatelyYes COMPAT_OBJS += compat/cygwin.o -- cgit v1.2.3 From 54360a19566f38b6d21dfd9e77ca0cc62b60ad84 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Mon, 12 Feb 2018 00:21:02 +0000 Subject: Makefile: suppress a sparse warning for pack-revindex.c Sparse has, for a long time, been issuing the following warning against the pack-revindex.c file: SP pack-revindex.c pack-revindex.c:64:23: warning: memset with byte count of 262144 This results from a unconditional check, with a hard-coded limit, which is really only appropriate for the kernel source code. (The check is for a 'large' byte count in a call to memcpy(), memset(), copy_from_user() and copy_to_user() functions). A recent release of sparse (v0.5.1) has introduced some options to allow this check to be turned off (-Wno-memcpy-max-count) or to specify the actual limit used (-fmemcpy-max-count=COUNT), rather than a hard-coded limit of 100000. In order to suppress the warning, add a target for pack-revindex.sp that adds the '-Wno-memcpy-max-count' option to the SPARSE_FLAGS variable. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index 1a9b23b679..7f40f76739 100644 --- a/Makefile +++ b/Makefile @@ -2176,6 +2176,8 @@ gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \ http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \ -DCURL_DISABLE_TYPECHECK +pack-revindex.sp: SPARSE_FLAGS += -Wno-memcpy-max-count + ifdef NO_EXPAT http-walker.sp http-walker.s http-walker.o: EXTRA_CPPFLAGS = -DNO_EXPAT endif -- cgit v1.2.3