summaryrefslogtreecommitdiff
path: root/compat/nedmalloc/nedmalloc.c
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsay1.demon.co.uk>2013-04-27 18:45:02 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-04-28 19:24:48 (GMT)
commit241c957d899fe829bf5754e8589e357ce9496783 (patch)
tree241164ae66af98373f00fa29ede56a74596e8806 /compat/nedmalloc/nedmalloc.c
parent4fc8fb48e978b8563493d04069c2507b7fb0064a (diff)
downloadgit-241c957d899fe829bf5754e8589e357ce9496783.zip
git-241c957d899fe829bf5754e8589e357ce9496783.tar.gz
git-241c957d899fe829bf5754e8589e357ce9496783.tar.bz2
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 'compat/nedmalloc/nedmalloc.c')
-rw-r--r--compat/nedmalloc/nedmalloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c
index 91c4e7f..609ebba 100644
--- a/compat/nedmalloc/nedmalloc.c
+++ b/compat/nedmalloc/nedmalloc.c
@@ -159,8 +159,8 @@ struct mallinfo nedmallinfo(void) THROWSPEC { return nedpmallinfo(0); }
#endif
int nedmallopt(int parno, int value) THROWSPEC { return nedpmallopt(0, parno, value); }
int nedmalloc_trim(size_t pad) THROWSPEC { return nedpmalloc_trim(0, pad); }
-void nedmalloc_stats() THROWSPEC { nedpmalloc_stats(0); }
-size_t nedmalloc_footprint() THROWSPEC { return nedpmalloc_footprint(0); }
+void nedmalloc_stats(void) THROWSPEC { nedpmalloc_stats(0); }
+size_t nedmalloc_footprint(void) THROWSPEC { return nedpmalloc_footprint(0); }
void **nedindependent_calloc(size_t elemsno, size_t elemsize, void **chunks) THROWSPEC { return nedpindependent_calloc(0, elemsno, elemsize, chunks); }
void **nedindependent_comalloc(size_t elems, size_t *sizes, void **chunks) THROWSPEC { return nedpindependent_comalloc(0, elems, sizes, chunks); }