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
if (begin==0){;}
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
#include "luaswig.swg"
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.
Edit: The respective file is luarun.swg, not luaswig.swg!
Sebastian, I think this needs some liasing between a few people. Would you mind opening a ticket on Github for discussion as SF tickets are not easy to use for discussion. http://githug.com/swig/swig
William,
can you, please, close this ticket? I filed a new issue on GitHub:
https://github.com/swig/swig/issues/157
Last edit: Sebastian 2014-04-09
Thanks