This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[commit] fix compilation error
- From: dje at google dot com (Doug Evans)
- To: pmuldoon at redhat dot com, gdb-patches at sourceware dot org
- Date: Fri, 7 Oct 2011 15:08:24 -0700 (PDT)
- Subject: [commit] fix compilation error
Hi.
Depending on what compiler one uses I can imagine not tripping over this,
so no worries.
cc1: warnings being treated as errors
../../src/gdb/python/py-value.c: In function 'valpy_call':
../../src/gdb/python/py-value.c:526: error: 'ftype' may be used uninitialized in this function
make: *** [py-value.o] Error 1
Committed.
2011-10-07 Doug Evans <dje@google.com>
* python/py-value.c (valpy_call): Initialize ftype to avoid compiler
warning.
Index: python/py-value.c
===================================================================
RCS file: /cvs/src/src/gdb/python/py-value.c,v
retrieving revision 1.27
diff -u -p -r1.27 py-value.c
--- python/py-value.c 7 Oct 2011 13:46:11 -0000 1.27
+++ python/py-value.c 7 Oct 2011 22:02:11 -0000
@@ -515,7 +515,7 @@ valpy_call (PyObject *self, PyObject *ar
volatile struct gdb_exception except;
struct value *function = ((value_object *) self)->value;
struct value **vargs = NULL;
- struct type *ftype;
+ struct type *ftype = NULL;
TRY_CATCH (except, RETURN_MASK_ALL)
{