From: Matthias Braun Date: Thu, 5 May 2005 12:50:59 +0000 (+0000) Subject: more squirrel warning fixes X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8cecc7815e5ab5fe2b646dbe6aaa8e95cf08e71f;p=supertux.git more squirrel warning fixes SVN-Revision: 2402 --- diff --git a/Jamrules b/Jamrules index 3213e5db0..524a8c59a 100644 --- a/Jamrules +++ b/Jamrules @@ -4,6 +4,9 @@ if ! $(top_builddir) } top_srcdir = $(TOP) ; +# unset some stuff defined in Jambase +LEX = ; + JAMCONFIG ?= $(top_builddir)/Jamconfig ; include $(JAMCONFIG) ; if ! $(JAMCONFIG_READ) diff --git a/src/scripting/Jamfile b/src/scripting/Jamfile index eb5c4929a..9def30629 100644 --- a/src/scripting/Jamfile +++ b/src/scripting/Jamfile @@ -30,8 +30,8 @@ if $(MINISWIG) actions MiniSwig bind headerfile { $(CPP) -x c $(CPPFLAGS) $(>) -o $(LOCATE_OBJECTS)/miniswig.tmp - $(MINISWIG) --output-cpp $(<) --input $(LOCATE_OBJECTS)/miniswig.tmp --output-hpp $(headerfile) --module $(modulename) $(FLAGS) -# rm -f $(LOCATE_OBJECTS)/miniswig.tmp + ./miniswig --output-cpp $(<) --input $(LOCATE_OBJECTS)/miniswig.tmp --output-hpp $(headerfile) --module $(modulename) $(FLAGS) +# rm -f $(LOCATE_OBJECTS)/miniswig.tmp } } diff --git a/src/scripting/wrapper.cpp b/src/scripting/wrapper.cpp index 21077fc28..d8c475cdf 100644 --- a/src/scripting/wrapper.cpp +++ b/src/scripting/wrapper.cpp @@ -2,10 +2,11 @@ * WARNING: This file is automatically generated from './build/i686-pc-linux-gnu/debug/miniswig.tmp' - do not change */ +#include #include +#include #include #include -#include #include "wrapper_util.h" #include "wrapper.interface.h" diff --git a/src/squirrel/squirrel/sqcompiler.cpp b/src/squirrel/squirrel/sqcompiler.cpp index 8a4347d33..40c8d4915 100644 --- a/src/squirrel/squirrel/sqcompiler.cpp +++ b/src/squirrel/squirrel/sqcompiler.cpp @@ -296,7 +296,7 @@ public: case TK_MULEQ: oper = '*'; break; case TK_DIVEQ: oper = '/'; break; case TK_MODEQ: oper = '%'; break; - default: assert(0); break; + default: oper = 0; assert(0); break; }; if(deref) { int val = _fs->PopTarget(); diff --git a/src/squirrel/squirrel/sqvm.cpp b/src/squirrel/squirrel/sqvm.cpp index 2395a3bf1..3dfcea152 100644 --- a/src/squirrel/squirrel/sqvm.cpp +++ b/src/squirrel/squirrel/sqvm.cpp @@ -115,6 +115,7 @@ bool SQVM::ArithMetaMethod(int op,const SQObjectPtr &o1,const SQObjectPtr &o2,SQ case _SC('/'): mm=MT_DIV; break; case _SC('*'): mm=MT_MUL; break; case _SC('%'): mm=MT_MODULO; break; + default: mm=MT_ADD; assert(0); break; } if(is_delegable(o1) && _delegable(o1)->_delegate) { Push(o1);Push(o2); diff --git a/tools/miniswig/create_wrapper.cpp b/tools/miniswig/create_wrapper.cpp index fc83acd10..f5ebbfe9e 100644 --- a/tools/miniswig/create_wrapper.cpp +++ b/tools/miniswig/create_wrapper.cpp @@ -31,7 +31,9 @@ WrapperCreator::create_wrapper(Namespace* ns) << inputfile << "' - do not change\n" << " */\n" << "\n" + << "#include \n" << "#include \n" + << "#include \n" << "#include \n" << "#include \n" << "#include \"wrapper_util.h\"\n" diff --git a/tools/miniswig/tree.h b/tools/miniswig/tree.h index f1149afb8..181a9fe44 100644 --- a/tools/miniswig/tree.h +++ b/tools/miniswig/tree.h @@ -6,6 +6,7 @@ #include #include #include +#include class Namespace;