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 <ram...@ramsayjones.plus.com>
---

Hi Junio,

This was going to be an email to Jameson, but I wasn't fast enough! :(

This was originally written against the 'pu' branch, but since the
'jm/mem-pool' branch has graduated to 'next', I have rebased on 'next'.

Perhaps this could be squashed into that branch when you re-build
the 'next' branch at the beginning of the next cycle?

ATB,
Ramsay Jones

 fast-import.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fast-import.c b/fast-import.c
index 0aa148ea4..38356e293 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;
-- 
2.16.0

Reply via email to