This is the mail archive of the archer@sourceware.org mailing list for the Archer project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[python] compile fixlet


I needed this to avoid an uninitialized error from gcc -O2.

Tom

2008-11-19  Tom Tromey  <tromey@redhat.com>

	* python/python-value.c (valpy_string): Initialize 'ret'.

diff --git a/gdb/python/python-value.c b/gdb/python/python-value.c
index 96a8c53..5868048 100644
--- a/gdb/python/python-value.c
+++ b/gdb/python/python-value.c
@@ -158,7 +158,7 @@ valpy_type (PyObject *self, PyObject *args)
 static PyObject *
 valpy_string (PyObject *self, PyObject *args)
 {
-  int length, ret;
+  int length, ret = 0;
   gdb_byte *buffer;
   struct value *value = ((value_object *) self)->value;
   volatile struct gdb_exception except;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]