I am building a C++ extension for use in Python. I am seeing this warning being generated during the compilation process - when a type:
python setup.py build
-Wstrict-prototypes
option is read by distutils from /usr/lib/pythonX.Y/config/Makefile
as part of OPT variable. It seems hackish, but you can override it by setting os.environ['OPT']
in your setup.py.
Here is a code that seems not too harmful:
import os
from distutils.sysconfig import get_config_vars
(opt,) = get_config_vars('OPT')
os.environ['OPT'] = " ".join(
flag for flag in opt.split() if flag != '-Wstrict-prototypes'
)