aboutsummaryrefslogtreecommitdiff
path: root/src/macros_and_utils.h
diff options
context:
space:
mode:
authorBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2018-11-11 08:50:49 +0100
committerBenoit Germain <b n t DOT g e r m a i n AT g m a i l DOT c o m>2018-11-11 08:50:49 +0100
commitb0bb224ce6c4bd769a3f1a868e832d9d38f6e63e (patch)
tree1810e92a24c95fa707b6b9bd56fd2526cdc86381 /src/macros_and_utils.h
parenta3ec8e0b6b5cc88063893fd7226599727a41dd29 (diff)
downloadlanes-b0bb224ce6c4bd769a3f1a868e832d9d38f6e63e.tar.gz
lanes-b0bb224ce6c4bd769a3f1a868e832d9d38f6e63e.tar.bz2
lanes-b0bb224ce6c4bd769a3f1a868e832d9d38f6e63e.zip
fix a bunch of compilation warnings (issue #157)
Diffstat (limited to 'src/macros_and_utils.h')
-rw-r--r--src/macros_and_utils.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/macros_and_utils.h b/src/macros_and_utils.h
index 9d73d50..550fc0a 100644
--- a/src/macros_and_utils.h
+++ b/src/macros_and_utils.h
@@ -36,8 +36,12 @@ extern char const* debugspew_indent;
36#define INDENT_BEGIN "%.*s " 36#define INDENT_BEGIN "%.*s "
37#define INDENT_END , (U ? U->debugspew_indent_depth : 0), debugspew_indent 37#define INDENT_END , (U ? U->debugspew_indent_depth : 0), debugspew_indent
38#define DEBUGSPEW_CODE(_code) _code 38#define DEBUGSPEW_CODE(_code) _code
39#define DEBUGSPEW_PARAM_COMMA( param_) param_,
40#define DEBUGSPEW_COMMA_PARAM( param_) , param_
39#else // USE_DEBUG_SPEW 41#else // USE_DEBUG_SPEW
40#define DEBUGSPEW_CODE(_code) 42#define DEBUGSPEW_CODE(_code)
43#define DEBUGSPEW_PARAM_COMMA( param_)
44#define DEBUGSPEW_COMMA_PARAM( param_)
41#endif // USE_DEBUG_SPEW 45#endif // USE_DEBUG_SPEW
42 46
43#ifdef NDEBUG 47#ifdef NDEBUG
@@ -56,10 +60,10 @@ extern char const* debugspew_indent;
56#define STACK_MID(L,change) \ 60#define STACK_MID(L,change) \
57 do \ 61 do \
58 { \ 62 { \
59 int a = lua_gettop( L) - _oldtop_##L; \ 63 int stack_check_a = lua_gettop( L) - _oldtop_##L; \
60 int b = (change); \ 64 int stack_check_b = (change); \
61 if( a != b) \ 65 if( stack_check_a != stack_check_b) \
62 luaL_error( L, "STACK ASSERT failed (%d not %d): %s:%d", a, b, __FILE__, __LINE__ ); \ 66 luaL_error( L, "STACK ASSERT failed (%d not %d): %s:%d", stack_check_a, stack_check_b, __FILE__, __LINE__ ); \
63 } while( 0) 67 } while( 0)
64#define STACK_END(L,change) STACK_MID(L,change); } 68#define STACK_END(L,change) STACK_MID(L,change); }
65 69