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

Re: [PATCH] Fix compiler warnings

From: <gstein_at_lyra.org>
Date: 2003-01-21 21:34:48 CET

On Tue, Jan 21, 2003 at 10:16:38AM -0800, Justin Erenkrantz wrote:
 This patch removes a bunch of compiler warnings seen with Sun Forte.
 Besides one 'statement not reachable' warning, the rest are
 signed/unsigned conflicts. The real root of this stems from the fact
 that apr_md5_* only deals with unsigned char*'s while everything else
 in SVN only deals with char*s. (Does GCC ignore these warnings?)

Can you rebuild your patch, given my change to the md5 interface?

...
 +++ subversion/libsvn_wc/props.c (working copy)
 @@ -205,9 +205,6 @@
    else
      /* values are the same, so another implicit merge. */
      return FALSE; /* no conflict */
 -
 - /* Default (will anyone ever reach this line?) */
 - return FALSE; /* no conflict found */
  }

For this very reason, I hate if statements where both branches return. I
always structure those as:

{
  if (test)
    {
      shorter block;
      return whatever;
    }
  
  longer block;
  return whatever;
}

...

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 14 02:04:52 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.