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.
[1] ISO 9899:1999 section 7.17 paragraph 3: "The macros are NULL
which expands to an implementation-defined null pointer constant;
and ..."
[2] ISO 9899:1999 section 6.3.2.3 paragraph 1: "An integer
constant expression with the value 0, or such an expression cast
to type void*, is called a null pointer constant."
--apb (Alan Barrett)