[Aptitude-svn-commit] r3938 - in branches/aptitude-0.3/aptitude: . src/generic

Daniel Burrows dburrows at costa.debian.org
Sat Aug 20 19:03:16 UTC 2005


Author: dburrows
Date: Sat Aug 20 19:03:12 2005
New Revision: 3938

Modified:
   branches/aptitude-0.3/aptitude/ChangeLog
   branches/aptitude-0.3/aptitude/src/generic/matchers.cc
Log:
Fix an uninitialized variable access detected by -O2.

Modified: branches/aptitude-0.3/aptitude/ChangeLog
==============================================================================
--- branches/aptitude-0.3/aptitude/ChangeLog	(original)
+++ branches/aptitude-0.3/aptitude/ChangeLog	Sat Aug 20 19:03:12 2005
@@ -1,5 +1,10 @@
 2005-08-20  Daniel Burrows  <dburrows at debian.org>
 
+	* src/generic/matchers.cc:
+
+	  Fix an uninitialized variable usage turned up by compiling with
+	  -O2.
+
 	* src/generic/problemresolver/problemresolver.h:
 
 	  Don't spew quite so much in debug mode when checking for

Modified: branches/aptitude-0.3/aptitude/src/generic/matchers.cc
==============================================================================
--- branches/aptitude-0.3/aptitude/src/generic/matchers.cc	(original)
+++ branches/aptitude-0.3/aptitude/src/generic/matchers.cc	Sat Aug 20 19:03:12 2005
@@ -646,13 +646,15 @@
 
   surrounding_or(dep, start, end);
 
-  bool first;
+  bool first = true;
 
   while(start != end)
     {
       if(!first)
 	realization += " | ";
 
+      first = false;
+
       realization += start.TargetPkg().Name();
 
       if(start.TargetVer())



More information about the Aptitude-svn-commit mailing list