[pygobject] setup.py: enable -Wdeclaration-after-statement
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] setup.py: enable -Wdeclaration-after-statement
- Date: Thu, 22 Mar 2018 07:05:05 +0000 (UTC)
commit 7ac4e21ac31419816a689907b3e9846f74d0c458
Author: Christoph Reiter <reiter christoph gmail com>
Date: Wed Mar 21 14:31:56 2018 +0100
setup.py: enable -Wdeclaration-after-statement
gi/pygtype.c | 3 ++-
setup.py | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/gi/pygtype.c b/gi/pygtype.c
index 7ef59730..64e6f5d5 100644
--- a/gi/pygtype.c
+++ b/gi/pygtype.c
@@ -630,11 +630,12 @@ pyg_type_lookup(GType type)
{
GType ptype = type;
PyGTypeMarshal *tm = NULL;
+ marshal_helper_data_e marshal_helper;
if (type == G_TYPE_INVALID)
return NULL;
- marshal_helper_data_e marshal_helper = GPOINTER_TO_INT (
+ marshal_helper = GPOINTER_TO_INT (
g_type_get_qdata(type, pyg_type_marshal_helper_key));
/* If we called this function before with @type and nothing was found,
diff --git a/setup.py b/setup.py
index 12b385b9..0793a98d 100755
--- a/setup.py
+++ b/setup.py
@@ -727,7 +727,7 @@ def add_ext_warn_flags(ext, compiler, _cache={}):
"-Wall",
"-Warray-bounds",
# "-Wcast-align",
- # "-Wdeclaration-after-statement",
+ "-Wdeclaration-after-statement",
# "-Wdouble-promotion",
"-Wduplicated-branches",
# "-Wduplicated-cond",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]