diff --git a/library/Core.cpp b/library/Core.cpp index 75fe576f4..6afe907aa 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -300,12 +300,6 @@ static void listScripts(PluginManager *plug_mgr, std::map &pset, } } -static bool fileExists(std::string path) -{ - ifstream script(path.c_str()); - return script.good(); -} - namespace { struct ScriptArgs { const string *pcmd; @@ -1612,16 +1606,19 @@ bool Core::Init() cerr << "Starting IO thread.\n"; // create IO thread thread * IO = new thread(fIOthread, (void *) temp); + (void)IO; } else { cerr << "Starting dfhack.init thread.\n"; thread * init = new thread(fInitthread, (void *) temp); + (void)init; } cerr << "Starting DF input capture thread.\n"; // set up hotkey capture thread * HK = new thread(fHKthread, (void *) temp); + (void)HK; screen_window = new Windows::top_level_window(); screen_window->addChild(new Windows::dfhack_dummy(5,10)); started = true; @@ -1819,6 +1816,7 @@ void Core::Resume() lock_guard lock(d->AccessMutex); assert(d->df_suspend_depth > 0 && d->df_suspend_thread == tid); + (void)tid; if (--d->df_suspend_depth == 0) d->core_cond.Unlock(); @@ -1858,6 +1856,7 @@ void Core::DisclaimSuspend(int level) lock_guard lock(d->AccessMutex); assert(d->df_suspend_depth == level && d->df_suspend_thread == tid); + (void)tid; if (level == 1000000) d->df_suspend_depth = 0; diff --git a/library/DataDefs.cpp b/library/DataDefs.cpp index 06f1ac6c9..c9586fcc0 100644 --- a/library/DataDefs.cpp +++ b/library/DataDefs.cpp @@ -271,8 +271,6 @@ virtual_identity *virtual_identity::find(void *vtable) Core &core = Core::getInstance(); std::string name = core.p->doReadClassName(vtable); - virtual_identity *actual = NULL; - auto name_it = name_lookup.find(name); if (name_it != name_lookup.end()) { virtual_identity *p = name_it->second; diff --git a/library/LuaApi.cpp b/library/LuaApi.cpp index 18b4ab270..47532c17b 100644 --- a/library/LuaApi.cpp +++ b/library/LuaApi.cpp @@ -2243,7 +2243,7 @@ static int filesystem_listdir(lua_State *L) return 3; } lua_newtable(L); - for(int i=0;igetNumBits()); return 1; diff --git a/library/LuaWrapper.cpp b/library/LuaWrapper.cpp index 6e7f81102..69fdd734e 100644 --- a/library/LuaWrapper.cpp +++ b/library/LuaWrapper.cpp @@ -46,8 +46,6 @@ distribution. using namespace DFHack; using namespace DFHack::LuaWrapper; -static luaL_Reg no_functions[] = { { NULL, NULL } }; - /** * Report an error while accessing a field (index = field name). */ @@ -1594,8 +1592,6 @@ static void RenderTypeChildren(lua_State *state, const std::vectorlock_add(); if(state == PS_LOADED)