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

RE: svn commit: r1096150 - /subversion/trunk/subversion/svnadmin/main.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Sun, 24 Apr 2011 03:59:47 +0200

> ==========================================================
> ====================
> > --- subversion/trunk/subversion/svnadmin/main.c (original)
> > +++ subversion/trunk/subversion/svnadmin/main.c Sat Apr 23 13:59:23
> 2011
> > @@ -2001,4 +2001,7 @@ subcommand_crashtest(apr_getopt_t *os, v
> >
> >   SVN_ERR(open_repos(&repos, opt_state->repository_path, pool));
> >   abort();
> > +
> > +  /* merely silence a compiler warning (this will never be executed) */
> > +  return SVN_NO_ERROR;
> >  }
> >
> >
>
> Heh. Now gcc emits an unreachable code error:
> subversion/svnadmin/main.c: In function ‘subcommand_crashtest’:
> subversion/svnadmin/main.c:2006: warning: will never be executed
>
> I suppose we could if-def the above line depending on the compiler.
> If we *don't* want to play such games, my heavily biased bikeshed
> would be to omit the admittedly superfluous line.

.SVN_ERR_MALFUNCTION() should work in all cases.

        Bert
Received on 2011-04-24 04:00:28 CEST

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.