Alan Barrett <a...@cequrux.com> writes: > 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*? > > NULL may be defined as any null pointer constant [1]; acceptable values > include 0 or ((void *)0) [2]. If NULL is defined as 0, then passing it to a > varargs function that expects any kind of pointer will not work properly.
We have had this discussion in the past and decided that casting was strictly correct; in some places we were already using (char *)NULL: http://svn.haxx.se/dev/archive-2011-02/0841.shtml -- Philip Martin | Subversion Committer WANdisco // *Non-Stop Data*