From: sfan5 Date: Wed, 21 Dec 2016 09:20:06 +0000 (+0100) Subject: Fix warning reported by clang (possible bug in Settings lua api) X-Git-Tag: 0.4.15~13 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=cc7c31a5bc44ab0010997e86c0a8c9f5f832b398;p=oweals%2Fminetest.git Fix warning reported by clang (possible bug in Settings lua api) --- diff --git a/src/script/lua_api/l_settings.cpp b/src/script/lua_api/l_settings.cpp index ea3d50857..d3fe03005 100644 --- a/src/script/lua_api/l_settings.cpp +++ b/src/script/lua_api/l_settings.cpp @@ -194,7 +194,7 @@ void LuaSettings::Register(lua_State* L) int LuaSettings::create_object(lua_State* L) { NO_MAP_LOCK_REQUIRED; - bool write_allowed; + bool write_allowed = true; const char* filename = luaL_checkstring(L, 1); CHECK_SECURE_PATH_POSSIBLE_WRITE(L, filename, &write_allowed); LuaSettings* o = new LuaSettings(filename, write_allowed);