From 41639fe4e555c5bf70dbbcba3f07db2672eb396e Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Fri, 30 Mar 2018 23:22:05 +0100 Subject: SQUASH??? fast-import: fix a sparse 'NULL pointer' warning Commit a8dfa11562 ("fast-import: introduce mem_pool type", 2018-03-26) introduces a 'mem_pool' type, along with a file-local global symbol ('fi_mem_poll') which is initialised in its declaration. This causes sparse to issue a warning, thus: SP fast-import.c fast-import.c:301:40: warning: Using plain integer as NULL pointer In order to suppress the warning, replace the '0' used to initialise the 'mp_block' field (of type 'struct mp_block *') with NULL. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- fast-import.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fast-import.c b/fast-import.c index 2658008aa2..ba08c8a863 100644 --- a/fast-import.c +++ b/fast-import.c @@ -298,7 +298,7 @@ static int global_argc; static const char **global_argv; /* Memory pools */ -static struct mem_pool fi_mem_pool = {0, 2*1024*1024 - sizeof(struct mp_block), 0 }; +static struct mem_pool fi_mem_pool = {NULL, 2*1024*1024 - sizeof(struct mp_block), 0 }; /* Atom management */ static unsigned int atom_table_sz = 4451; -- cgit v1.2.1