From 5ba1a8a735c721cc66cc030866163f6fdb7f5ecb Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Sun, 28 Oct 2012 21:05:25 +0000 Subject: [PATCH] builtin/config.c: Fix a sparse warning Sparse issues an "Using plain integer as NULL pointer" warning while checking a 'struct strbuf_list' initializer expression. The initial field of the struct has pointer type, but the initializer expression is given as '{0}'. In order to suppress the warning, we simply replace the initializer with '{NULL}'. Signed-off-by: Ramsay Jones Signed-off-by: Jeff King --- builtin/config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/config.c b/builtin/config.c index f881053cb..e796af4db 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -165,7 +165,7 @@ static int collect_config(const char *key_, const char *value_, void *cb) static int get_value(const char *key_, const char *regex_) { int ret = CONFIG_GENERIC_ERROR; - struct strbuf_list values = {0}; + struct strbuf_list values = {NULL}; int i; if (use_key_regexp) { -- 2.26.2