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

Re: svn commit: r1535399 - in /subversion/trunk/subversion: libsvn_fs_fs/ libsvn_fs_x/ libsvn_subr/ libsvn_wc/ mod_authz_svn/ tests/cmdline/ tests/libsvn_client/ tests/libsvn_fs_fs/ tests/libsvn_fs_x/ tests/libsvn_subr/ tests/libsvn_wc/

From: Branko Čibej <brane_at_wandisco.com>
Date: Fri, 25 Oct 2013 11:28:26 +0200

On 25.10.2013 11:18, Branko Čibej wrote:
> On 25.10.2013 11:15, Julian Foad wrote:
>> I (Julian Foad) wrote:
>>>> On Fri, 25 Oct 2013, Branko Čibej wrote:
>>>>>> URL: http://svn.apache.org/r1535399
>>>>>> Log:
>>>>>> Cast NULL to (char *) in vararg calls to svn_dirent_join_many
>>>>>> and svn_path_join_many.
>>>>> Why? On which platform do you expect a char* to have a different size
>>>>> and/or representation than a void*?
>>> Brane, we have been doing this consistently for the last three years;
>>> Philip's commit was just continuing it. See [1] for the original
>>> discussion.
>>> [1] Email to dev@ from Stefan Sperling on 2011-02-25, subject "Re: svn
>>> commit: r1074461 ...",
>>> <http://svn.haxx.se/dev/archive-2011-02/0841.shtml>.
>> Now having read the original discussion (October 2010; the later email mentioned above is merely a good reference to it), it appears we are doing this in order to silence compiler warnings rather than for object-code correctness.
> Yes, exactly my point ... compiler warnings that someone goes out of
> their way to enable, even though they're not enabled in maintainer mode.
> You know how I feel about /that/.
> And then we have week-long flames on the dev@ list when someone
> pre-emptively initializes a local var to silence a "may be used
> uninitialized" warning. See the first entry in the 1.8.x STATUS file,
> for example. Duh.

Sideline: *IF* we, as a community, agree to do this, then: (a) the rule
should be documented in HACKING, and (b) there should be a '#define
NULLPTR ((void*)0)' or reasonable facsimile in either svn_types.h or
svn_private_config.h. I really do not want to see '(char*)NULL' all over
the place. That's ... unsightly.

Oh, and (c) the associated warning must be enabled in maintainer mode.

-- Brane

Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-10-25 11:29:06 CEST

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