From fc2084addbac58bba1503998cd5c730c316ab8ab Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Mon, 30 Mar 2015 10:35:20 +0300 Subject: [PATCH] Fix compiler warning on unused variables --- pdns/ext/luawrapper/include/LuaContext.hpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/pdns/ext/luawrapper/include/LuaContext.hpp b/pdns/ext/luawrapper/include/LuaContext.hpp index b4bb19fec2..c17c1bbb3c 100644 --- a/pdns/ext/luawrapper/include/LuaContext.hpp +++ b/pdns/ext/luawrapper/include/LuaContext.hpp @@ -58,6 +58,12 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # include "misc/exception.hpp" #endif +#ifdef _GNUC +# define ATTR_UNUSED __attribute__((unused)) +#else +# define ATTR_UNUSED +#endif + /** * Defines a Lua context * A Lua context is used to interpret Lua code. Since everything in Lua is a variable (including functions), @@ -1702,10 +1708,10 @@ private: }; /// @deprecated -static LuaContext::EmptyArray_t +static LuaContext::EmptyArray_t ATTR_UNUSED LuaEmptyArray {}; /// @deprecated -static LuaContext::Metatable_t +static LuaContext::Metatable_t ATTR_UNUNSED LuaMetatable {}; /**************************************************/ -- 2.47.2