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

Goto label warning with gcc -Wall

From: Blair Zajac <blair_at_orcaware.com>
Date: 2002-02-12 03:30:41 CET

When not compiling with --enable-maintainer-mode, then you get this warning
with gcc -Wall:

subversion/mod_dav_svn/repos.c: In function `dav_svn_get_resource':
subversion/mod_dav_svn/repos.c:1030: warning: label `unknown_URI' defined but not used

The label is used here:

#ifdef SVN_DEBUG
  if (comb->res.type == DAV_RESOURCE_TYPE_UNKNOWN)
      DBG0("DESIGN FAILURE: should not be UNKNOWN at this point");
      goto unknown_URI;

and the goto is this:

  /* Unknown URI. Return NULL to indicate "no resource" */
  *resource = NULL;
  return NULL;

Can the label code just be moved into the if statement, or is there a
reason that this code is split up? -1 on style points here. If not,
then let's put #ifdef SVN_DEBUG around the label and the code following it.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:37:06 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.