[Zope3-checkins] CVS: Zope3/src/zodb/btrees - BucketTemplate.c:1.15

Guido van Rossum guido@python.org
Wed, 16 Apr 2003 11:21:51 -0400


Update of /cvs-repository/Zope3/src/zodb/btrees
In directory cvs.zope.org:/tmp/cvs-serv14931

Modified Files:
	BucketTemplate.c 
Log Message:
Squash GCC warning about value being used uninitialized.


=== Zope3/src/zodb/btrees/BucketTemplate.c 1.14 => 1.15 ===
--- Zope3/src/zodb/btrees/BucketTemplate.c:1.14	Fri Apr 11 15:10:17 2003
+++ Zope3/src/zodb/btrees/BucketTemplate.c	Wed Apr 16 11:21:50 2003
@@ -296,7 +296,11 @@
 {
     int i, cmp;
     KEY_TYPE key;
-    VALUE_TYPE value;
+    VALUE_TYPE value = {0}; /* Subtle: VALUE_TYPE can be various types,
+			       including a 6-char array,
+			       but {0} is always a valid initializer.
+			       Without an initialization, GCC warns about
+			       this variable being used uninitialized. */
     int result = -1;    /* until proven innocent */
     int copied = 1;