[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-13 01:42:45 CET

Malcolm Rowe wrote:
> On Thu, Jan 19, 2006 at 04:10:21PM +0000, Julian Foad wrote:
>
>>By putting "__attribute__((warn_unused_result))" on each declaration of a
>>function that returns "svn_error_t *", I found the following errors being
>>leaked:
>
> Fantastic job, Julian! I fixed all the trivial instances in r18196.
>
> The ones I didn't fix were:
>
>>subversion/libsvn_diff/diff_file.c: In function
>>'svn_diff__file_output_unified_default_hdr':
>>subversion/libsvn_diff/diff_file.c:894: return value of 'svn_io_stat'
>
> .. because the function 'can't fail', and:
>
>>subversion/svn/main.c: In function 'main':
>>subversion/svnadmin/main.c: In function 'main':
>>subversion/svndumpfilter/main.c: In function 'main':
>>subversion/svnlook/main.c: In function 'main':
>>subversion/svnsync/main.c: In function 'main':
>
> .. because the main functions need something slightly more complex
> (a call to svn_cmdline_handle_exit_error(), perhaps).
>
> So those still need some attention.

I fixed the one in diff_file.c in r18446. The ones in the various 'main'
functions aren't so important, though I might do them later. (There's no
end-user benefit to cleaning up just before exiting the program, only developer
benefits like learning by example, clean use of 'valgrind', etc.)

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 13 01:43:43 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.