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

[PATCH] revision.c: fix an 'Using integer as NULL pointer' warning

From
Ramsay Jones <ramsay@ramsayjones.plus.com>
Date
Mar 19, 2017, 21:11 UTC
Message-ID
<b465515a-5868-a614-ff99-490f4c86aa69@ramsayjones.plus.com>
Signed-off-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
---
Hi Duy,

If you need to re-roll your 'nd/prune-in-worktree' branch, could you please squash this into the relevant patch (commit 0a30ae48bb, "revision.c: --indexed-objects add objects from all worktrees", 18-03-2017).

Thanks!

ATB, Ramsay Jones

 revision.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/revision.c b/revision.c
index e01e2f99c..a06b150f7 100644
--- a/revision.c
+++ b/revision.c
@@ -1336,7 +1336,7 @@ void add_index_objects_to_pending(struct rev_info *revs, unsigned int flags)
 	worktrees = get_worktrees(0);
 	for (p = worktrees; *p; p++) {
 		struct worktree *wt = *p;
-		struct index_state istate = {0};
+		struct index_state istate = { NULL };
 
 		if (wt->is_current)
 			continue; /* current index already taken care of */
-- 
2.12.0
Message 1 of 1 in “revision.c: fix an 'Using integer as NULL pointer' warning”
  1. revision.c: fix an 'Using integer as NULL pointer' warningRamsay Jones, Mar 19, 2017

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.