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

RE: svn commit: r1330233 - /subversion/trunk/subversion/libsvn_subr/sqlite.c

From: Bert Huijben <bert_at_qqmail.nl>
Date: Wed, 25 Apr 2012 21:35:59 +0200

>
> On Apr 25, 2012 8:16 AM, <rhuijben_at_apache.org> wrote:
> >...
> > +++ subversion/trunk/subversion/libsvn_subr/sqlite.c Wed Apr 25 12:16:12
2012
> > @@ -718,8 +718,23 @@ close_apr(void *data)
> > for (i = 0; i < db->nbr_statements; i++)
> > {
> > if (db->prepared_stmts[i])
> > - err = svn_error_compose_create(
> > + {
> > + if (db->prepared_stmts[i]->needs_reset)
> > + {
> > +#ifdef SVN_DEBUG
> > + const char *stmt_text = db->statement_strings[i];
> > + stmt_text = stmt_text; /* Provide value for debugger */
> > +
> > + SVN_ERR_MALFUNCTION_NO_RETURN();
> > +#else
> > + err = svn_error_compose_create(
> > + err,
> > + svn_sqlite__reset(db->prepared_stmts[i]));
> > +#endif
> I think the reset should be outside the #ifdef. Couldn't the app install
an "ignore" malfunction handler and fall through? If so, we want the
statement reset.

SVN_ERR_MALFUNCTION_NO_RETURN() can't return (as the name implies).

Therefore the compiler will warn that the following code is unreachable.

        Bert
Received on 2012-04-25 21:36:42 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.