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

Re: svn commit: r1222522 - /subversion/branches/1.7.x/STATUS

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Sat, 24 Dec 2011 18:32:42 +0100

On 24.12.2011 18:18, Branko Čibej wrote:
> On 24.12.2011 17:37, Daniel Shahaf wrote:
>> Stefan Küng wrote on Sat, Dec 24, 2011 at 17:24:51 +0100:
>>> Then why are there multiple statements like this in the svn code:
>>> SVN_ERR_ASSERT_NO_RETURN(svn_dirent_is_absolute(local_abspath));
>>> (example from libsvn_wc\util.c, line 197).
>> Because the containing function doesn't return svn_error_t.
>
> Which is exactly what I said earlier. As long as we have /any/ function
> that does not return an error code, unless we can prove that it cannot
> fail in a detectable manner, there's not even a theoretical chance of
> removing such assertions.

But that function doesn't need an absolute path at all. Callers of that
function might, but those functions could most likely return an error.

and please take a look at the file libsvn_wc\props.c, search for
SVN_ERR_ASSERT_NO_RETURN.
I don't even know how to respond to something like this: calling
SVN_ERR_ASSERT_NO_RETURN() but in the very next line there's a statement
that could return an error, just that it never goes there because
SVN_ERR_ASSERT_NO_RETURN as the name implies never returns.

I can't add anything more to code like this.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
Received on 2011-12-24 18:33:23 CET

This is an archived mail posted to the Subversion Dev mailing list.