summaryrefslogtreecommitdiff
path: root/gi/pygobject-object.c
diff options
context:
space:
mode:
authorChristoph Reiter <creiter@src.gnome.org>2017-03-22 19:24:22 +0100
committerChristoph Reiter <creiter@src.gnome.org>2017-03-24 08:30:35 +0100
commit5399bb785e625c36025d6bc1e5cf2b5519759d0d (patch)
treefea1e8f79e7683ed453ff19dc2ed9ea04e880cc0 /gi/pygobject-object.c
parent29d07d6e659a518f4e0a7f53eba3dc1d9ba33c3a (diff)
downloadpygobject-5399bb785e625c36025d6bc1e5cf2b5519759d0d.tar.gz
Fix various compiler warnings for 32bit builds
Due to the switch to AX_COMPILER_FLAGS which adds some more warning flags. I didn't notice these as they only get triggered on 32bit builds. Tested with gcc 6.3 and clang 3.9. https://bugzilla.gnome.org/show_bug.cgi?id=780409
Diffstat (limited to 'gi/pygobject-object.c')
-rw-r--r--gi/pygobject-object.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/gi/pygobject-object.c b/gi/pygobject-object.c
index 25731b27..1c97594e 100644
--- a/gi/pygobject-object.c
+++ b/gi/pygobject-object.c
@@ -1837,7 +1837,7 @@ pygobject_emit(PyGObject *self, PyObject *args)
return NULL;
}
g_signal_query(signal_id, &query);
- if (len != query.n_params + 1) {
+ if ((gsize)len != query.n_params + 1) {
gchar buf[128];
g_snprintf(buf, sizeof(buf),
@@ -1922,7 +1922,7 @@ pygobject_chain_from_overridden(PyGObject *self, PyObject *args)
return NULL;
}
g_signal_query(signal_id, &query);
- if (len != query.n_params) {
+ if (len < 0 || (gsize)len != query.n_params) {
gchar buf[128];
g_snprintf(buf, sizeof(buf),