I use GCC 4.8 with SWIG 3.0.0 and Lua.
The compiler g++ is run with -Wall -Werror .
When compiling the generated wrapper code, the compiler complains on several issues:
Unused variable 'begin' -> This appears multiple times in the line
int begin = lua_gettop(L);
I found a workaround adding
to the same line to luaswig.swg using 'sed'.
Unused parameter 'swig_type' in luaswig.swg, line:
SWIGINTERN int SWIG_Lua_iterate_bases(lua_State L, swig_type_info * swig_type, int first_arg, swig_lua_base_iterator_func func, int const ret)
Here I tried to resolve the problem by commenting out 'swig_type', but at another point in my project I enhance the SWIG-Lua bindings using
in a C++ source file. If I remove swig_type from the parameter list, the compiler complains that it needs the parameter at that point.
In the wrapper code, I have multiple compiler warnings
XYZ defined, but not used (-Werror=unused-variable)
XYZ are entries like swig_string_constants, swig_string_Sf_SwigStatic_meta, (with a class string being wrapped)
To ensure quality control, I can not switch off -Wall -Werror in my project. Until SWIG 2.0.11 I was able to use a sequence of sed commands to find work arounds. But in this case, I would be very grateful if some of the SWIG developers could fix this issue.
Log in to post a comment.