From: Peter van Dijk Date: Fri, 24 Mar 2017 10:43:03 +0000 (+0100) Subject: fix unused parameter warnings by commenting names X-Git-Tag: rec-4.1.0-alpha1~171^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc61a45c1919d2d23409189b1257ec151bce1401;p=thirdparty%2Fpdns.git fix unused parameter warnings by commenting names fix unused nullptr_t parameter warning luawrapper 4901e73 2e21101 --- diff --git a/ext/luawrapper/include/LuaContext.hpp b/ext/luawrapper/include/LuaContext.hpp index eb0ec598f4..6ee104880e 100644 --- a/ext/luawrapper/include/LuaContext.hpp +++ b/ext/luawrapper/include/LuaContext.hpp @@ -399,7 +399,7 @@ public: * @tparam TType Type whose function belongs to */ template - void unregisterFunction(const std::string& functionName) + void unregisterFunction(const std::string& /*functionName*/) { lua_pushlightuserdata(mState, const_cast(&typeid(TType))); lua_pushnil(mState); @@ -1256,7 +1256,7 @@ private: std::array buffer; // read function ; "data" must be an instance of Reader - static const char* read(lua_State* l, void* data, size_t* size) { + static const char* read(lua_State* /*l*/, void* data, size_t* size) { assert(size != nullptr); assert(data != nullptr); Reader& me = *static_cast(data); @@ -1610,7 +1610,7 @@ private: * This functions reads multiple values starting at "index" and passes them to the callback */ template - static auto readIntoFunction(lua_State* state, tag, TCallback&& callback, int index) + static auto readIntoFunction(lua_State* /*state*/, tag, TCallback&& callback, int /*index*/) -> TRetValue { return callback(); @@ -1732,7 +1732,7 @@ static LuaContext::Metatable_t ATTR_UNUSED /* PARTIAL IMPLEMENTATIONS */ /**************************************************/ template<> -inline auto LuaContext::readTopAndPop(lua_State* state, PushedObject obj) +inline auto LuaContext::readTopAndPop(lua_State* /*state*/, PushedObject /*obj*/) -> void { } @@ -1939,8 +1939,7 @@ struct LuaContext::Pusher { static const int minSize = 1; static const int maxSize = 1; - static PushedObject push(lua_State* state, std::nullptr_t value) noexcept { - assert(value == nullptr); + static PushedObject push(lua_State* state, std::nullptr_t) noexcept { lua_pushnil(state); return PushedObject{state, 1}; } @@ -2409,11 +2408,11 @@ private: push2(state, std::move(value), std::integral_constant{}); } - static int push2(lua_State* state, const std::tuple&, std::integral_constant) noexcept { + static int push2(lua_State* /*state*/, const std::tuple&, std::integral_constant) noexcept { return 0; } - static int push2(lua_State* state, std::tuple&&, std::integral_constant) noexcept { + static int push2(lua_State* /*state*/, std::tuple&&, std::integral_constant) noexcept { return 0; } }; @@ -2744,7 +2743,7 @@ private: template struct VariantReader::type::value == 0>::type> { - static auto read(lua_State* state, int index) + static auto read(lua_State* /*state*/, int /*index*/) -> boost::optional { return boost::none; @@ -2769,7 +2768,7 @@ public: template<> struct LuaContext::Reader> { - static auto read(lua_State* state, int index, int maxSize = 0) + static auto read(lua_State* /*state*/, int /*index*/, int /*maxSize*/ = 0) -> boost::optional> { return std::tuple<>{};