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
This commit is contained in:
nhmall
2022-05-01 12:18:45 -04:00
parent 71c55e4285
commit 308dce273d

View File

@@ -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