From 308dce273df11adcec3f2abb4f18c5be8f5c39da Mon Sep 17 00:00:00 2001 From: nhmall Date: Sun, 1 May 2022 12:18:45 -0400 Subject: [PATCH] warning bits on Windows build src/nhlua.c(1606): warning C4127: conditional expression is constant src/nhlua.c(2032): warning C4127: conditional expression is constant --- src/nhlua.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/nhlua.c b/src/nhlua.c index 093d3317f..a28ce2c43 100644 --- a/src/nhlua.c +++ b/src/nhlua.c @@ -1595,6 +1595,8 @@ nhl_loadlua(lua_State *L, const char *fname) return ret; } +DISABLE_WARNING_CONDEXPR_IS_CONSTANT + lua_State * nhl_init(nhl_sandbox_info *sbi) { @@ -1659,6 +1661,8 @@ nhl_init(nhl_sandbox_info *sbi) return L; } +RESTORE_WARNING_CONDEXPR_IS_CONSTANT + void nhl_done(lua_State *L) { @@ -1999,6 +2003,8 @@ out: } #endif +DISABLE_WARNING_CONDEXPR_IS_CONSTANT + #ifdef NHL_SANDBOX static void nhlL_openlibs(lua_State *L, uint32_t lflags){ @@ -2148,6 +2154,8 @@ multiple levels - io.*, FILE.* - can we hook FILE.*? } #endif +RESTORE_WARNING_CONDEXPR_IS_CONSTANT + /* * All we can do is approximate the amount of storage used. Every allocator * has different overhead and uses that overhead differently. Since we're