This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
[python] compile fixlet
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Wed, 19 Nov 2008 14:01:10 -0700
- Subject: [python] compile fixlet
- Reply-to: Tom Tromey <tromey at redhat dot com>
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;