summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRamsay Jones <ramsay@ramsayjones.plus.com>2018-03-30 23:22:05 +0100
committerJunio C Hamano <gitster@pobox.com>2018-03-30 15:26:32 -0700
commit41639fe4e555c5bf70dbbcba3f07db2672eb396e (patch)
tree15dfffa81ced32c9b23b4f05b6a723ce9ac9ee32
parentf1f2817a4fdf6c20b3edd732f8658298c4306253 (diff)
downloadgit-jm/mem-pool.tar.gz
SQUASH??? fast-import: fix a sparse 'NULL pointer' warningjm/mem-pool
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 <ramsay@ramsayjones.plus.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--fast-import.c2
1 files changed, 1 insertions, 1 deletions
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;