From 5f961b426b9bd25956e5364770c71c34c414d4e6 Mon Sep 17 00:00:00 2001 From: Christoph Reiter Date: Thu, 5 Apr 2018 11:30:44 +0200 Subject: build: use -Wconversion -Wno-sign-conversion. Fixes #191 In some cases changing the type used was enough, in some others I just force casted things as too many changes would be required and overflow unlikely (for array marshalling the cache uses gssize while the marshalling code uses garray and thus guint) My hope is that having this enabled will improve things gradually with future cleanups. --- setup.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 52af46f2..1ef7b90a 100755 --- a/setup.py +++ b/setup.py @@ -799,6 +799,7 @@ def add_ext_compiler_flags(ext, compiler, _cache={}): "-Wundef", "-Wunused-but-set-variable", "-Wwrite-strings", + "-Wconversion", ] args += [ @@ -806,6 +807,7 @@ def add_ext_compiler_flags(ext, compiler, _cache={}): "-Wno-missing-field-initializers", "-Wno-unused-parameter", "-Wno-discarded-qualifiers", + "-Wno-sign-conversion", ] # silence clang for unused gcc CFLAGS added by Debian -- cgit v1.2.1