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

Re: [PATCH] Trivial warning fix for imap-send.c

From
Junio C Hamano <junkio@cox.net>
Date
Mar 12, 2006, 11:27 UTC
Message-ID
<7v7j6zgaxx.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<slrne17urp.fr9.mdw@metalzone.distorted.org.uk>
Mark Wooding <mdw@distorted.org.uk> writes:
> This is not the right fix.  NULL can be simply a #define for 0 (see
> 6.3.2.3#3 and 7.17).  You need to write (char *)0 or (char *)NULL.  I
> prefer to avoid the macro NULL entirely, since its misleading behaviour
> is precisely what got us into this mess.
Patches welcome.  We have about 15 or so such instances.

$ git grep -n -H 'execl[_a-z]*(' '*.c' cat-file.c:139: return execl_git_cmd("ls-tree", argv[2], NULL); connect.c:547: execlp(git_proxy_command, git_proxy_command, host, port, NULL); connect.c:646: execlp(ssh, ssh_basename, host, command, NULL); connect.c:654: execlp("sh", "sh", "-c", command, NULL); daemon.c:263: execl_git_cmd("upload-pack", "--strict", timeout_buf, ".", NULL); exec_cmd.c:97:int execl_git_cmd(const char *cmd,...) fetch-clone.c:32: execl_git_cmd("index-pack", "-o", idx, pack_tmp_name, NULL); fetch-clone.c:109: execl_git_cmd("unpack-objects", quiet ? "-q" : NULL, NULL); git.c:256: execlp("man", "man", page, NULL); imap-send.c:948: execl( "/bin/sh", "sh", "-c", srvc->tunnel, NULL ); merge-index.c:18: execlp(pgm, arguments[0], pager.c:14: execlp(prog, prog, NULL); rsh.c:106: execlp(ssh, ssh_basename, host, command, NULL); upload-pack.c:92: execl_git_cmd("pack-objects", "--stdout", NULL);

Previous: Mark WoodingNext: Mark Wooding
Message 3 of 20 in “Trivial warning fix for imap-send.c”
  1. Trivial warning fix for imap-send.cArt Haas, Mar 11, 2006
  2. Mark WoodingMar 12, 2006
  3. Junio C HamanoMar 12, 2006
  4. Use explicit pointers for execl...() sentinels.Mark Wooding, Mar 12, 2006
  5. Timo HirvonenMar 12, 2006
  6. Mark WoodingMar 12, 2006
  7. Timo HirvonenMar 12, 2006
  8. Jeff KingMar 13, 2006
  9. Linus TorvaldsMar 12, 2006
  10. Mark WoodingMar 12, 2006
  11. A Large Angry SCMMar 12, 2006
  12. H. Peter AnvinMar 13, 2006
  13. A Large Angry SCMMar 13, 2006
  14. Linus TorvaldsMar 13, 2006
  15. H. Peter AnvinMar 13, 2006
  16. Linus TorvaldsMar 13, 2006
  17. Olivier GalibertMar 13, 2006
  18. Jeff KingMar 13, 2006
  19. H. Peter AnvinMar 13, 2006
  20. Linus TorvaldsMar 12, 2006

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.