]> granicus.if.org Git - nethack/commitdiff
suppress warnings during vs 3rd party x64 builds
authornhmall <nhmall@nethack.org>
Fri, 10 Jun 2022 00:02:19 +0000 (20:02 -0400)
committernhmall <nhmall@nethack.org>
Fri, 10 Jun 2022 00:02:19 +0000 (20:02 -0400)
These warning are in 3rd party library builds (one
in Lua relating to padding due to alignment), and
a few in pdcurses. We won't be addressing the code
in  those.

sys/windows/Makefile.nmake

index 2a27bb293b98d01474918114732f12856889f432..268c0f165e1c42470b3be87a3b8d20997ac8af04 100644 (file)
@@ -918,17 +918,17 @@ DLB =
        @$(cc) /wd4244 $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
 
 {$(PDCSRC)}.c{$(OBJ)}.o:
-       @$(cc) /wd4244 $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
+       @$(cc) /wd4244 /wd4267 $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
 
 {$(PDCWINCON)}.c{$(OBJ)}.o:
-       @$(cc) /wd4244 $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
+       @$(cc) /wd4244 /wd4267 $(PDCINCL) $(cflagsBuild) $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
 
 #==========================================
 # Rules for LUA files
 #==========================================
 
 {$(LUASRC)}.c{$(OBJ)}.o:
-       @$(cc) $(cflagsBuild) -wd4701 -wd4702 -wd4774 $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
+       @$(cc) $(cflagsBuild) -wd4701 -wd4702 -wd4774 -wd4324 $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $<
 
 #==========================================
 #=============== TARGETS ==================
@@ -1845,6 +1845,8 @@ clean:
 #   * commented out $(TARGETPFX)tile.o: tile.c $(HACK_H)
 #   * commented out the lines starting with
 #      $(TARGET_CC) so the rules in this Makefile will be used instead
+#   * add compile recipe for nhlua.c to add -wd4324 to suppress a
+#     warning during x64 build related to padding due to alignment
 # but otherwise untouched.
 # That means that there is some irrelevant stuff
 # in here, but maintenance should be easier.
@@ -2205,6 +2207,7 @@ $(TARGETPFX)mthrowu.o: mthrowu.c $(HACK_H)
 $(TARGETPFX)muse.o: muse.c $(HACK_H)
 $(TARGETPFX)music.o: music.c $(HACK_H)
 $(TARGETPFX)nhlua.o: nhlua.c $(HACK_H) $(INCL)\dlb.h
+       @$(cc) $(cflagsBuild) -wd4324 $(CROSSCOMPILE) $(CROSSCOMPILE_TARGET) -Fo$@ $(@B).c
 $(TARGETPFX)nhlsel.o: nhlsel.c $(HACK_H) $(INCL)\sp_lev.h
 $(TARGETPFX)nhlobj.o: nhlobj.c $(HACK_H) $(INCL)\sp_lev.h
 $(TARGETPFX)o_init.o: o_init.c $(HACK_H)