summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2013-04-27 19:45:02 +0100
committerJunio C Hamano <gitster@pobox.com>2013-04-28 12:24:48 -0700
commit241c957d899fe829bf5754e8589e357ce9496783 (patch)
tree241164ae66af98373f00fa29ede56a74596e8806 /Makefile
parent4fc8fb48e978b8563493d04069c2507b7fb0064a (diff)
downloadgit-241c957d899fe829bf5754e8589e357ce9496783.tar.gz
compat/nedmalloc: Fix some sparse warnings
Sparse issues many "Using plain integer as NULL pointer" warnings while checking nedmalloc.c (at least 98 such warnings before giving up due to "too many warnings"). In addition, sparse issues some "non-ANSI function declaration" type warnings for the symbols 'win32_getcurrentthreadid', 'malloc_stats' and 'malloc_footprint'. In order to suppress the NULL pointer warnings, rather than replace all uses of '0' as a null pointer representation with NULL, we add -Wno-non-pointer-null to SPARSE_FLAGS while checking nedmalloc.c. In order to suppress the "non-ANSI function declaration" warnings, we simply include the missing 'empty parameter list' prototype (void) in the function declarations. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile1
1 files changed, 1 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 0f931a2030..450a1d4483 100644
--- a/Makefile
+++ b/Makefile
@@ -2004,6 +2004,7 @@ endif
ifdef USE_NED_ALLOCATOR
compat/nedmalloc/nedmalloc.sp compat/nedmalloc/nedmalloc.o: EXTRA_CPPFLAGS = \
-DNDEBUG -DOVERRIDE_STRDUP -DREPLACE_SYSTEM_ALLOCATOR
+compat/nedmalloc/nedmalloc.sp: SPARSE_FLAGS += -Wno-non-pointer-null
endif
git-%$X: %.o GIT-LDFLAGS $(GITLIBS)