From c1cdc4cff92ca98e6424d567f15c1ba2f028bbbb Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Mon, 10 Dec 2012 23:08:06 +1100 Subject: [PATCH] Disable some GCC warning flags for the SWIG-generated Python code. --- lang/python/setup.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lang/python/setup.py b/lang/python/setup.py index 96cdc50b1de..05600dd3353 100644 --- a/lang/python/setup.py +++ b/lang/python/setup.py @@ -13,16 +13,17 @@ from distutils.core import setup, Extension if not 'ARCHFLAGS' in os.environ: os.environ['ARCHFLAGS'] = '' -# Suppress warnings building SWIG code on OS X 10.8 -extra_cflags = [] +# Suppress warnings building SWIG generated code +extra_cflags = [ + '-Wno-unused-value', +] if sys.platform == 'darwin': kernel_version = os.uname()[2] # e.g. 12.0.0 is Mountain Lion major_version = int(kernel_version.split('.')[0]) if major_version >= 12: extra_cflags += [ '-Wno-self-assign', - '-Wno-unused-value', - '-Qunused-arguments' + '-Qunused-arguments', ] dir = os.path.dirname(__file__)