From: Uwe Hermann Date: Sat, 22 Nov 2014 21:06:02 +0000 (+0100) Subject: python: Silence some warnings via -Wno-uninitialized. X-Git-Tag: libsigrok-0.4.0~721 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=5fcc5909cc5f870e581fd367fd7b86b58c58e7c6;p=libsigrok.git python: Silence some warnings via -Wno-uninitialized. Silence some warnings when building the Python bindings: sigrok/core/classes_wrap.cpp: In function ‘PyObject* _wrap_new_OutputFormatMap(PyObject*, PyObject*)’: sigrok/core/classes_wrap.cpp:5232:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized] res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info(),0); ^ sigrok/core/classes_wrap.cpp:14383:13: note: ‘argv[0]’ was declared here PyObject *argv[2]; ^ sigrok/core/classes_wrap.cpp: In function ‘PyObject* _wrap_new_ChannelGroupMap(PyObject*, PyObject*)’: sigrok/core/classes_wrap.cpp:5232:4: warning: ‘argv[0]’ may be used uninitialized in this function [-Wmaybe-uninitialized] res = SWIG_ConvertPtr(obj,(void**)&p,swig::type_info(),0); ^ sigrok/core/classes_wrap.cpp:23356:13: note: ‘argv[0]’ was declared here PyObject *argv[2]; ^ We add -Wno-uninitialized since the warnings are harmless and we really don't care about them in the generated classes_wrap.cpp. This fixes parts of #417. --- diff --git a/bindings/python/setup.py b/bindings/python/setup.py index 50c93856..7a328fe1 100644 --- a/bindings/python/setup.py +++ b/bindings/python/setup.py @@ -77,7 +77,7 @@ setup( sources = [vpath('sigrok/core/classes.i')], swig_opts = ['-c++', '-threads', '-Isigrok/core'] + ['-I%s' % i for i in includes], - extra_compile_args = ['-std=c++11'], + extra_compile_args = ['-std=c++11', '-Wno-uninitialized'], include_dirs = includes, library_dirs = libdirs, libraries = libs)