A better fix for gcc-4.8, from jpeach

Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/e574dd39
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/e574dd39
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/e574dd39

Branch: refs/heads/sphinx-docs
Commit: e574dd392a0e865ae1355e6c6f25ad5eb68c5ed9
Parents: 8e12350
Author: Leif Hedstrom <[email protected]>
Authored: Sat Apr 27 20:03:36 2013 -0600
Committer: Leif Hedstrom <[email protected]>
Committed: Sat Apr 27 20:03:36 2013 -0600

----------------------------------------------------------------------
 plugins/experimental/lua/hook.cc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/e574dd39/plugins/experimental/lua/hook.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/lua/hook.cc b/plugins/experimental/lua/hook.cc
index e4a4e4e..3f3f7cb 100644
--- a/plugins/experimental/lua/hook.cc
+++ b/plugins/experimental/lua/hook.cc
@@ -97,6 +97,10 @@ LuaPushEventData(lua_State * lua, TSEvent event, void * 
edata)
 }
 
 
+#if defined(INLINE_LUA_HOOK_REFERENCE)
+typedef char __size_check[sizeof(this_type) == sizeof(void *) ? 0 : -1];
+#endif
+
 // For 64-bit pointers, we can inline the LuaHookReference, otherwise we need 
an extra malloc.
 //
 #if SIZEOF_VOID_POINTER >= 8
@@ -125,8 +129,6 @@ struct inline_tuple
 
   static void * allocate(const first_type first, const second_type second) {
 #if defined(INLINE_LUA_HOOK_REFERENCE)
-    typedef char __size_check[sizeof(this_type) == sizeof(void *) ? 0 : -1];
-
     this_type obj;
     obj.first() = first;
     obj.second() = second;

Reply via email to