more squirrel warning fixes
authorMatthias Braun <matze@braunis.de>
Thu, 5 May 2005 12:50:59 +0000 (12:50 +0000)
committerMatthias Braun <matze@braunis.de>
Thu, 5 May 2005 12:50:59 +0000 (12:50 +0000)
SVN-Revision: 2402

Jamrules
src/scripting/Jamfile
src/scripting/wrapper.cpp
src/squirrel/squirrel/sqcompiler.cpp
src/squirrel/squirrel/sqvm.cpp
tools/miniswig/create_wrapper.cpp
tools/miniswig/tree.h

index 3213e5d..524a8c5 100644 (file)
--- 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)
index eb5c492..9def306 100644 (file)
@@ -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
     }
 }
 
index 21077fc..d8c475c 100644 (file)
@@ -2,10 +2,11 @@
  * WARNING: This file is automatically generated from './build/i686-pc-linux-gnu/debug/miniswig.tmp' - do not change
  */
 
+#include <config.h>
 #include <new>
+#include <assert.h>
 #include <string>
 #include <squirrel.h>
-#include <assert.h>
 #include "wrapper_util.h"
 #include "wrapper.interface.h"
 
index 8a4347d..40c8d49 100644 (file)
@@ -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();
index 2395a3b..3dfcea1 100644 (file)
@@ -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);
index fc83acd..f5ebbfe 100644 (file)
@@ -31,7 +31,9 @@ WrapperCreator::create_wrapper(Namespace* ns)
         << inputfile << "' - do not change\n"
         << " */\n"
         << "\n"
+        << "#include <config.h>\n"
         << "#include <new>\n"
+        << "#include <assert.h>\n"
         << "#include <string>\n"
         << "#include <squirrel.h>\n"
         << "#include \"wrapper_util.h\"\n"
index f1149af..181a9fe 100644 (file)
@@ -6,6 +6,7 @@
 #include <iostream>
 #include <sstream>
 #include <stdexcept>
+#include <assert.h>
 
 class Namespace;