From: Aki Tuomi Date: Mon, 30 Mar 2015 07:35:20 +0000 (+0300) Subject: Fix compiler warning on unused variables X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~98^2~28^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2387%2Fhead;p=thirdparty%2Fpdns.git Fix compiler warning on unused variables --- 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 {}; /**************************************************/