From 22a8699a6b1587024b884a80d88631db6a0ef511 Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Sat, 8 Oct 2011 17:18:00 +0100 Subject: [PATCH 1/2] builtin/log.c: Fix an "Using plain integer as NULL pointer" warning Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- builtin/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/log.c b/builtin/log.c index e80a925b7b..4395f3e471 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -1040,7 +1040,7 @@ static char *find_branch_name(struct rev_info *rev) if (positive < 0) return NULL; strbuf_addf(&buf, "refs/heads/%s", rev->cmdline.rev[positive].name); - branch = resolve_ref(buf.buf, branch_sha1, 1, 0); + branch = resolve_ref(buf.buf, branch_sha1, 1, NULL); if (!branch || prefixcmp(branch, "refs/heads/") || hashcmp(rev->cmdline.rev[positive].item->sha1, branch_sha1)) From 273c7032e9e79613349e24db3b0e40e8b5c0c62c Mon Sep 17 00:00:00 2001 From: Ramsay Jones Date: Sun, 9 Oct 2011 18:33:34 +0100 Subject: [PATCH 2/2] environment.c: Fix an sparse "symbol not declared" warning In particular, sparse issues the following warning: environment.c:62:5: warning: symbol 'merge_log_config' was not \ declared. Should it be static? In order to supress the warning, we include the "fmt-merge-msg.h" header file, since it contains an appropriate extern declaration for the 'merge_log_config' variable. Signed-off-by: Ramsay Jones Signed-off-by: Junio C Hamano --- environment.c | 1 + 1 file changed, 1 insertion(+) diff --git a/environment.c b/environment.c index ba9781b713..4b7ecab8b5 100644 --- a/environment.c +++ b/environment.c @@ -9,6 +9,7 @@ */ #include "cache.h" #include "refs.h" +#include "fmt-merge-msg.h" char git_default_email[MAX_GITNAME]; char git_default_name[MAX_GITNAME];