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<map_type>(),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<map_type>(),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.
This commit is contained in:
Uwe Hermann 2014-11-22 22:06:02 +01:00
parent 47af616fd7
commit 5fcc5909cc
1 changed files with 1 additions and 1 deletions

View File

@ -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)