2009-12-09 Phil Muldoon <pmuldoon@redhat.com>
authorPhil Muldoon <pmuldoon@redhat.com>
Wed, 9 Dec 2009 07:49:31 +0000 (07:49 +0000)
committerPhil Muldoon <pmuldoon@redhat.com>
Wed, 9 Dec 2009 07:49:31 +0000 (07:49 +0000)
* python/py-type.c (typy_range): Initialize variables to zero.

gdb/python/py-type.c

index c581307d57c552d50a4215694428e7251aa3aad3..0ebc9a562b8537299a20ee020c211f48b2235872 100644 (file)
@@ -282,7 +282,8 @@ typy_range (PyObject *self, PyObject *args)
   struct type *type = ((type_object *) self)->type;
   PyObject *result;
   PyObject *low_bound = NULL, *high_bound = NULL;
-  LONGEST low, high;
+  /* Initialize these to appease GCC warnings.  */
+  LONGEST low = 0, high = 0;
 
   if (TYPE_CODE (type) != TYPE_CODE_ARRAY
       && TYPE_CODE (type) != TYPE_CODE_STRING