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

Karl, subversion/libsvn_client/log.c

From: Blair Zajac <blair_at_orcaware.com>
Date: 2003-01-03 05:06:38 CET

Hi Karl,

Your 4186 commit on subversion/libsvn_client/log.c in svn_client_log
now gets this warning message with gcc 3.2.1 on my RedHat 8.0 box:

subversion/libsvn_client/log.c: In function `svn_client_log':
subversion/libsvn_client/log.c:67: warning: `err' might be used
uninitialized in this function

The following patch fixes the warning, but is this a good solution
for the issue? It's not clear to me if setting err just covers up
a logic flow issue.

Index: subversion/libsvn_client/log.c
===================================================================
--- subversion/libsvn_client/log.c (revision 4235)
+++ subversion/libsvn_client/log.c (working copy)
@@ -64,7 +64,7 @@
   const char *auth_dir;
   apr_array_header_t *condensed_targets;
   svn_revnum_t start_revnum, end_revnum;
- svn_error_t *err;
+ svn_error_t *err = SVN_NO_ERROR; /* Silence a gcc uninitialized warning */

   if ((start->kind == svn_opt_revision_unspecified)
       || (end->kind == svn_opt_revision_unspecified))

Best,
Blair

-- 
Blair Zajac <blair@orcaware.com>
Plots of your system's performance - http://www.orcaware.com/orca/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 3 05:06:37 2003

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.