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