]> granicus.if.org Git - nethack/commitdiff
warning bits on Windows build
authornhmall <nhmall@nethack.org>
Sun, 1 May 2022 16:18:45 +0000 (12:18 -0400)
committernhmall <nhmall@nethack.org>
Sun, 1 May 2022 16:18:45 +0000 (12:18 -0400)
src/nhlua.c(1606): warning C4127: conditional expression is constant
src/nhlua.c(2032): warning C4127: conditional expression is constant

src/nhlua.c

index 093d3317f3365a9bd2ed20087f37d9452bc37407..a28ce2c43c1d8920676cb24fe6917279bfe0e3a9 100644 (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