]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Fix compiler warning on unused variables 2387/head
authorAki Tuomi <cmouse@desteem.org>
Mon, 30 Mar 2015 07:35:20 +0000 (10:35 +0300)
committerAki Tuomi <cmouse@desteem.org>
Mon, 30 Mar 2015 07:36:52 +0000 (10:36 +0300)
pdns/ext/luawrapper/include/LuaContext.hpp

index b4bb19fec2d5797cf8c795c3163aa5164868137e..c17c1bbb3c06cf711efc0e918330f53caa43f94b 100644 (file)
@@ -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 {};
     
 /**************************************************/