[pygobject/gsoc2009: 123/160] Fix compilation warnings
- From: Simon van der Linden <svdlinden src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pygobject/gsoc2009: 123/160] Fix compilation warnings
- Date: Fri, 14 Aug 2009 21:34:05 +0000 (UTC)
commit 9f6731124b2330e3b296959f8a01441a20195ddc
Author: Philippe Normand <phil base-art net>
Date: Thu Aug 6 22:22:24 2009 +0200
Fix compilation warnings
gi/pygi-argument.c | 7 ++++---
gi/pygi-info.c | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/gi/pygi-argument.c b/gi/pygi-argument.c
index fd1761c..27db2bd 100644
--- a/gi/pygi-argument.c
+++ b/gi/pygi-argument.c
@@ -32,7 +32,7 @@
static gsize
_pygi_gi_type_tag_size (GITypeTag type_tag)
{
- gsize size;
+ gsize size = 0;
switch(type_tag) {
@@ -114,6 +114,8 @@ _pygi_gi_type_tag_py_bounds (GITypeTag type_tag,
PyObject **lower,
PyObject **upper)
{
+ *lower = *upper = NULL;
+
switch(type_tag) {
case GI_TYPE_TAG_INT8:
*lower = PyInt_FromLong(-128);
@@ -186,7 +188,6 @@ _pygi_gi_type_tag_py_bounds (GITypeTag type_tag,
break;
default:
PyErr_SetString(PyExc_TypeError, "Non-numeric type tag");
- *lower = *upper = NULL;
return;
}
}
@@ -199,7 +200,7 @@ _pygi_g_registered_type_info_check_object (GIRegisteredTypeInfo *info,
gint retval;
PyObject *type;
- gchar *type_name_expected;
+ gchar *type_name_expected = NULL;
type = pygi_type_find_by_info((GIBaseInfo *)info);
if (type == NULL) {
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 610437a..94e278d 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -152,7 +152,7 @@ PyObject *
_pygi_info_new (GIBaseInfo *info)
{
GIInfoType info_type;
- PyTypeObject *type;
+ PyTypeObject *type = NULL;
PyGIBaseInfo *self;
info_type = g_base_info_get_type(info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]