git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] builtin/blame.c: Fix a "Using plain integer as NULL pointer" warning

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
May 13, 2012, 21:41 UTC
Message-ID
<4FB02A7C.1000605@ramsay1.demon.co.uk>
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
Hi Junio,

I try to catch these warnings, while the topics are still in the pu branch, so that we can squash the fix into them before they hit next. I don't know how I missed this one (commit 4b4132f, "blame: factor out helper for calling xdi_diff()", 09-05-2012) which was part of the 'rs/xdiff-lose-emit-func' branch.

Sorry about that.

ATB, Ramsay Jones

 builtin/blame.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builtin/blame.c b/builtin/blame.c
index 778d661..24d3dd5 100644
--- a/builtin/blame.c
+++ b/builtin/blame.c
@@ -93,7 +93,7 @@ static int diff_hunks(mmfile_t *file_a, mmfile_t *file_b, long ctxlen,
 {
 	xpparam_t xpp = {0};
 	xdemitconf_t xecfg = {0};
-	xdemitcb_t ecb = {0};
+	xdemitcb_t ecb = {NULL};
 
 	xpp.flags = xdl_opts;
 	xecfg.ctxlen = ctxlen;
-- 
1.7.10
Next: René Scharfe
Message 1 of 3 in “builtin/blame.c: Fix a "Using plain integer as NULL pointer" warning”
  1. builtin/blame.c: Fix a "Using plain integer as NULL pointer" warningRamsay Jones, May 13, 2012
  2. René ScharfeMay 13, 2012
  3. Ramsay JonesMay 15, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.