Skip to content

Fix a compilation error in CLICopti_octave_wrap.cc

Kyrre Ness Sjobaek requested to merge kyrsjo/clicopti:SWIG-compilefix into master

Apparently the old statement was no longer legal (gcc 10.2.1, default install on Fedora 32). New statement is legal.

The error was:

make[1]: Entering directory '/home/kyrsjo/cernbox/tmp/clicopti/swig'
mkoctfile CLICopti_octave_wrap.cc -Wno-unused-function -std=c++11 -Ofast -fPIC -Wall -Wno-unused-function -Wno-overloaded-virtual -I../h -c
annobin: CLICopti_octave_wrap.cc: Warning: -D_GLIBCXX_ASSERTIONS not defined
CLICopti_octave_wrap.cc: In function ‘octave_value SWIG_Error(int, const char*)’:
CLICopti_octave_wrap.cc:921:18: error: format not a string literal and no format arguments [-Werror=format-security]
  921 |   error(r.c_str());
      |                  ^
CLICopti_octave_wrap.cc: In member function ‘virtual octave_value octave_swig_type::map(octave_base_value::unary_mapper_t) const’:
CLICopti_octave_wrap.cc:1710:66: error: format not a string literal and no format arguments [-Werror=format-security]
 1710 |         error((opname + std::string(" method not found")).c_str());
      |                                                                  ^
cc1plus: some warnings being treated as errors
make[1]: *** [Makefile:42: CLICopti_octave_wrap.o] Error 1

Merge request reports