Re: subversion/libsvn_wc/update_editor.c compile warning
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-09-25 01:15:07 CEST
Philip Martin wrote:
Since NULL as an argument list terminator is just a convention used by that particular function and some others, not a language-defined thing, it is understandable that the compiler doesn't know that the value is being ignored. (And it does say "might be used", but then a warning is a warning - it doesn't go away just because we know that it isn't ACTUALLY being used.)
Passing extra arguments after the valid arguments to a varargs function strikes me as poor style, but then making a duplicate of the function call with its first eight arguments is a bit uncomfortable as well. So I'm torn between just adding an "= NULL" initialiser and rewriting it something like:
if (copyfrom_url)
assert (SVN_IS_VALID_REVNUM (copyfrom_rev));
svn_xml_make_open_tag
Not that it's anything to do with me ... I'm just butting in to your conversation.
- Julian
---------------------------------------------------------------------
|
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.