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

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

From
Horst von Brand <vonbrand@inf.utfsm.cl>
Date
Mar 12, 2006, 21:51 UTC
Message-ID
<200603122151.k2CLpgt0008036@laptop11.inf.utfsm.cl>
In-Reply-To
<mdw@distorted.org.uk>
Mark Wooding <mdw@distorted.org.uk> wrote:
Show 5 quoted lines
> Linus Torvalds <torvalds@osdl.org> wrote:
> > So in modern C, using NULL at the end of a varargs array as a pointer is 
> > perfectly sane, and the extra cast is just ugly and bowing to bad 
> > programming practices and makes no sense to anybody who never saw the 
> > horror that is K&R.
> No!  You can still get bitten.
Only if the compiler is completely broken.
>                                 You're lucky that on common platforms
> all pointers look the same, but if you find one where `char *' (and
> hence `void *') isn't the same as `struct foo *' then, under appropriate
> circumstances you /will/ unless you put the casts in.
Show one platform where this is true...
> Now, maybe we don't care for GIT.  That's your (and Junio's) call.  My
> natural approach is to work as closely as I can to the specs (and then
> throw in hacks for platforms which /still/ don't work), though, which is
> why I brought the subject up.
If on the platform you use it doesn't work, change the compiler. Fast.
-- 
Dr. Horst H. von Brand                   User #22616 counter.li.org
Departamento de Informatica                     Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria              +56 32 654239
Casilla 110-V, Valparaiso, Chile                Fax:  +56 32 797513
Message 1 of 1 in “Re: [PATCH] Trivial warning fix for imap-send.c”
  1. Horst von BrandMar 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.