diff --git a/examples/osgshaderterrain/osgshaderterrain.cpp b/examples/osgshaderterrain/osgshaderterrain.cpp index c167ee432..38271c732 100644 --- a/examples/osgshaderterrain/osgshaderterrain.cpp +++ b/examples/osgshaderterrain/osgshaderterrain.cpp @@ -270,7 +270,6 @@ public: OpenThreads::ScopedLock lock(_mutex); - unsigned int contextID = gc->getState()->getContextID(); osg::GL2Extensions* gl2ext = gc->getState()->get(); if( gl2ext ) { diff --git a/examples/osgtransferfunction/TransferFunctionWidget.h b/examples/osgtransferfunction/TransferFunctionWidget.h index 806f4dbd2..64d9dd3af 100644 --- a/examples/osgtransferfunction/TransferFunctionWidget.h +++ b/examples/osgtransferfunction/TransferFunctionWidget.h @@ -19,12 +19,10 @@ #include -#define OSGUI_EXPORT - namespace osgUI { -class OSGUI_EXPORT TransferFunctionWidget : public osgUI::Widget +class TransferFunctionWidget : public osgUI::Widget { public: TransferFunctionWidget(osg::TransferFunction1D* tf=0); diff --git a/src/osgPlugins/lua/LuaScriptEngine.cpp b/src/osgPlugins/lua/LuaScriptEngine.cpp index a714954e5..ce8ae26bf 100644 --- a/src/osgPlugins/lua/LuaScriptEngine.cpp +++ b/src/osgPlugins/lua/LuaScriptEngine.cpp @@ -2778,7 +2778,7 @@ int LuaScriptEngine::getDataFromStack(SerializerScratchPad* ssp, osgDB::BaseSeri { if (lua_isboolean(_lua, pos)) { - ssp->set(static_cast(lua_toboolean(_lua, pos))); + ssp->set(static_cast(lua_toboolean(_lua, pos)!=0)); return 0; } else if (lua_isnumber(_lua, pos)) @@ -3116,7 +3116,7 @@ int LuaScriptEngine::setPropertyFromStack(osg::Object* object, const std::string { if (lua_isboolean(_lua, -1)) { - _ci.setProperty(object, propertyName, static_cast(lua_toboolean(_lua, -1))); + _ci.setProperty(object, propertyName, static_cast(lua_toboolean(_lua, -1)!=0)); return 0; } else if (lua_isnumber(_lua, -1)) diff --git a/src/osgPlugins/lua/lua-5.2.3/src/lauxlib.c b/src/osgPlugins/lua/lua-5.2.3/src/lauxlib.c index b00f8c709..1a505409e 100644 --- a/src/osgPlugins/lua/lua-5.2.3/src/lauxlib.c +++ b/src/osgPlugins/lua/lua-5.2.3/src/lauxlib.c @@ -600,7 +600,7 @@ static int skipBOM (LoadF *lf) { do { c = getc(lf->f); if (c == EOF || c != *(const unsigned char *)p++) return c; - lf->buff[lf->n++] = c; /* to be read by the parser */ + lf->buff[lf->n++] = (char)c; /* to be read by the parser */ } while (*p != '\0'); lf->n = 0; /* prefix matched; discard it */ return getc(lf->f); /* return next character */ @@ -650,7 +650,7 @@ LUALIB_API int luaL_loadfilex (lua_State *L, const char *filename, skipcomment(&lf, &c); /* re-read initial portion */ } if (c != EOF) - lf.buff[lf.n++] = c; /* 'c' is the first character of the stream */ + lf.buff[lf.n++] = (char)c; /* 'c' is the first character of the stream */ status = lua_load(L, getF, &lf, lua_tostring(L, -1), mode); readstatus = ferror(lf.f); if (filename) fclose(lf.f); /* close file (even in case of errors) */ diff --git a/src/osgPlugins/lua/lua-5.2.3/src/lcode.c b/src/osgPlugins/lua/lua-5.2.3/src/lcode.c index 820b95c0e..4a92b3463 100644 --- a/src/osgPlugins/lua/lua-5.2.3/src/lcode.c +++ b/src/osgPlugins/lua/lua-5.2.3/src/lcode.c @@ -270,7 +270,7 @@ void luaK_checkstack (FuncState *fs, int n) { void luaK_reserveregs (FuncState *fs, int n) { luaK_checkstack(fs, n); - fs->freereg += n; + fs->freereg += (lu_byte)(n); } @@ -702,8 +702,8 @@ static void codenot (FuncState *fs, expdesc *e) { void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { lua_assert(!hasjumps(t)); - t->u.ind.t = t->u.info; - t->u.ind.idx = luaK_exp2RK(fs, k); + t->u.ind.t = (lu_byte)t->u.info; + t->u.ind.idx = (short)luaK_exp2RK(fs, k); t->u.ind.vt = (t->k == VUPVAL) ? VUPVAL : check_exp(vkisinreg(t->k), VLOCAL); t->k = VINDEXED; @@ -876,6 +876,6 @@ void luaK_setlist (FuncState *fs, int base, int nelems, int tostore) { } else luaX_syntaxerror(fs->ls, "constructor too long"); - fs->freereg = base + 1; /* free registers with list values */ + fs->freereg = (lu_byte)(base + 1); /* free registers with list values */ }