[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: More error leaks

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-04 20:01:18 CET

> On 1/26/06, Branko Èibej <brane@xbc.nu> wrote:
>
>>Before anyone starts doing this, please consider:
>>
>> * What happens to the generated API documentation

Doxygen seems to do what you want when SVN_ERR_FUNC is defined as

   __attribute__((warn_unused_result)) svn_error_t *

That is, for a function declared as "SVN_ERR_FUNC function_name" it just shows
"svn_error_t *function_name" in the docs and "SVN_ERR_FUNC" doesn't appear
anywhere except as a defined symbol and in the source-code views.

>> * Can we conceivably do this with an attribute on svn_error_t
>> instead of every function that returns it

I don't think so, with the current compilers.

David James wrote:
> Here's an alternative proposal: Instead of adding attributes to each
> function manually, we could write a script which adds and removes the
> attributes on demand. If folks want to test for deprecated functions,
> unchecked errors, or other problems, they can use this script.

That's a good idea. I found it quite easy to mostly automate adding
"SVN_ERR_FUNC", and I think it should be possible to fully automate it.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Feb 4 20:01:40 2006

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.