Re: Warning for missing sentinel arguments
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Tue, 19 Nov 2013 11:38:47 +0000 (GMT)
> On 11/18/13 3:03 PM, Julian Foad wrote:
>> The patch also changes SVN_NO_ERROR from "0" to "((svn_error_t *)0)". This
Actually, this is a change of a public API and maybe ABI (I'm not sure), and while it might be a good idea in itself it should not be casually changed as part of this patch. So I'll leave out that change and not mark svn_cl__try() with SVN_SENTINEL_NULL, since GCC's attribute requires the sentinel argument to be a pointer.
Ben Reser wrote:
Makes sense. Done.
The name 'SVN_SENTINEL_NULL' sounds rather like a value to be used for the sentinel argument itself. I think 'SVN_NEEDS_SENTINEL_NULL' or 'SVN_ATTRIBUTE_SENTINEL_NULL' is better. It doesn't matter that it's longer because it's used very rarely and so being self-documenting is more important than being short. Changed (to 'NEEDS').
Another consideration is that each of these source annotations is itself a kind of API change, in the sense that it's not necessarily invisible to users. I'm thinking of how I have to specially tell both Doxygen and Netbeans IDE's code-assistance that these macros should be ignored (assumed empty) when parsing the code. But it seems that we accept this.
Committed revision 1543394.
- 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.