[MPlayer-dev-eng] [PATCH] cast null pointers

Reimar Döffinger Reimar.Doeffinger at gmx.de
Thu Aug 12 19:09:40 CEST 2010


On Thu, Aug 12, 2010 at 06:54:35PM +0200, Reimar Döffinger wrote:
> On Thu, Aug 12, 2010 at 04:56:49PM +0100, Edd Barrett wrote:
> > Just a small stylistic note. Null pointers for execl should be casted to
> > pointer types. Pointed out to me by naddy@ (http://c-faq.com/null/null2.html):
> 
> What a nonsense, the C99 standard (e.g. section 7.17) specifies NULL
> as a "null pointer constant", so it is required to be a pointer type.
> Some implementations may not conform to this, but unless you know
> of a specific one where this actually causes issues this is just
> obfuscation.

Hm, I managed to get myself confused by the language.
A "null pointer constant" is actually not required to be a "null
pointer" and thus to be of pointer type.
Seems somewhat silly to me, but well.
However, thing is that those exec calls aren't the only places
this kind of assumption is made, and fixing just one place
IMO only provides a false impression of the code actually working
on such a system.
It seems preferable to me to just not support such systems, at least
for now...


More information about the MPlayer-dev-eng mailing list