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

[PATCH] initialize loop condition in set_prop_merge_state

From: Olaf Hering <olh_at_suse.de>
Date: Wed, 23 Jan 2008 15:55:44 +0100

gcc4 complains.

subversion/libsvn_wc/props.c: In function 'svn_wc__merge_props':
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here
subversion/libsvn_wc/props.c:1166: warning: 'state_pos' is used uninitialized in this function
subversion/libsvn_wc/props.c:1145: note: 'state_pos' was declared here

---
 subversion/libsvn_wc/props.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
--- a/subversion/libsvn_wc/props.c
+++ b/subversion/libsvn_wc/props.c
@@ -1160,7 +1160,7 @@ set_prop_merge_state(svn_wc_notify_state
       svn_wc_notify_state_merged,
       svn_wc_notify_state_obstructed,
       svn_wc_notify_state_conflicted };
-  int state_pos, i;
+  int state_pos = 0, i;
 
   if (! state)
     return;
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-01-23 16:16:20 CET

This is an archived mail posted to the Subversion Dev mailing list.