[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1003986 [1/2] - in /subversion/trunk/subversion: libsvn_client/ libsvn_fs_base/ libsvn_fs_base/bdb/ libsvn_fs_fs/ libsvn_ra_local/ libsvn_ra_neon/ libsvn_ra_serf/ libsvn_ra_svn/ libsvn_repos/ libsvn_subr/ libsvn_wc/ mod_authz_svn/ mod_...

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: Mon, 04 Oct 2010 11:14:04 -0400

On Mon, 2010-10-04 at 06:14 -0400, Julian Foad wrote:
> The NULL macro is intended for use as a pointer.

Only when statically cast to the appropriate pointer type. This happens
automatically in many contexts, such as assignments or prototyped
function parameters. But it does not happen automatically for variable
parameters of a stdarg function.

So apr_pstrcat(foo, bar, NULL) really is invalid C code. It's not a
practical concern because common platforms use a single pointer
representation, but it's a fair warning for a compiler to give.

This message brought to you by Language Lawyers Inc.
Received on 2010-10-04 17:14:48 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.