[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 05:04:23 +0200

On 24.10.2013 17:00, philip_at_apache.org wrote:
> Author: philip
> Date: Thu Oct 24 15:00:12 2013
> New Revision: 1535399
>
> 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*? If you can't point to a specific
crash caused by passing NULL instead of (char*)NULL, then you've messed
up the diffs for no good reason.

-- Brane

P.S.: I'm well aware that, according to a strict interpretation of the C
standard, (void*)0 and (char*)0 are not interchangeable. But we do not
support a single platform where the ABI does not treat them identically.
Which is why I throw a fit every time I see someone casting (void*) to
something else (in C, not C++), or worse, the other way around -- other
than to add or remove const.

-- 
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane_at_wandisco.com
Received on 2013-10-25 05:05:06 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.