]> granicus.if.org Git - nethack/commitdiff
remove GCC_WARN
authorSHIRAKATA Kentaro <argrath@ub32.org>
Sat, 5 Nov 2022 11:56:55 +0000 (20:56 +0900)
committerPatR <rankin@nethack.org>
Tue, 8 Nov 2022 20:09:26 +0000 (12:09 -0800)
Now, the only usage of GCC_WARN is for the guard of PRINTF_F in wincurs.h.
This guard can be removed safely, as PRINTF_F is already used unconditionally in extern.h.

include/wincurs.h
sys/unix/Makefile.src
sys/unix/hints/include/compiler.370
sys/unix/hints/include/cross-pre.370

index 34a326e37704bc942764460d637e1bfd2fdb9b5f..363fa4d772d8dba9c309cee69d07373ce30db7bb 100644 (file)
@@ -58,10 +58,8 @@ typedef enum orient_type
     UNDEFINED
 } orient;
 
-#ifdef GCC_WARN
 int wprintw(WINDOW *, const char *, ...) PRINTF_F(2, 3);
 int mvwprintw(WINDOW *, int, int, const char *, ...) PRINTF_F(4, 5);
-#endif
 
 /* cursmain.c */
 
index 51170e3a70ecfc1661d0a78900ae7a2c4f4abc1a..a77cc9eadb611d87708d6ca04362d3af67d53eed 100644 (file)
@@ -91,7 +91,7 @@ SYSOBJ = $(TARGETPFX)ioctl.o $(TARGETPFX)unixmain.o $(TARGETPFX)unixtty.o \
 #
 #
 # if you're debugging and want gcc to check as much as possible, use:
-# CC = gcc -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -DGCC_WARN
+# CC = gcc -W -Wimplicit -Wreturn-type -Wunused -Wformat -Wswitch -Wshadow -Wcast-qual -Wwrite-strings
 
 # flags may have to be changed as required
 # flags for 286 Xenix:
index 73af1e7bd2e784452eea35a0f6d30b00df95918d..a4a7e06e278187e5affaa34da22d9d96bd543f27 100755 (executable)
@@ -133,10 +133,6 @@ CCXXFLAGS+=-Wno-deprecated-declarations
 endif  # WANT_WIN_QT
 endif  # clang-specific ends here
 
-# enable some optional code in various NetHack source files
-CFLAGS+=-DGCC_WARN
-CCXXFLAGS+=-DGCC_WARN
-
 ifdef MAKEFILE_SRC
 ifdef WANT_WIN_QT
 # when switching from Qt5 to Qt6 or vice versa, any old .moc files will be
index 94d8cec14ab816c7a3b27e5f44e6646b817dce1d..d991ffc533569c48f646103e540a88b2b48eb0c1 100644 (file)
@@ -159,8 +159,7 @@ MSDOS_TARGET_CFLAGS = -c -O -I../include -I../sys/msdos -I../win/share \
         -Wall -Wextra -Wno-missing-field-initializers -Wreturn-type -Wunused \
         -Wformat -Wswitch -Wshadow -Wwrite-strings \
        -Wimplicit -Wimplicit-function-declaration -Wimplicit-int \
-       -Wmissing-parameter-type -Wold-style-definition -Wstrict-prototypes \
-       -DGCC_WARN
+       -Wmissing-parameter-type -Wold-style-definition -Wstrict-prototypes
 PDCINCL += -I$(PDCPORT)
 PDC_TARGET_CFLAGS = $(MSDOS_TARGET_CFLAGS) -Wno-unused-parameter \
                        -Wno-missing-prototypes
@@ -285,7 +284,6 @@ WASM_CFLAGS += -Wshadow
 WASM_CFLAGS += $(WINCFLAGS)   #WINCFLAGS set from multiw-2.370
 WASM_CFLAGS += -DSYSCF -DSYSCF_FILE=\"/sysconf\" -DSECURE
 WASM_CFLAGS += -g -I../include -DNOTPARMDECL
-WASM_CFLAGS += -DGCC_WARN
 # NetHack sources control
 WASM_CFLAGS += -DDLB
 WASM_CFLAGS += -DHACKDIR=\"$(HACKDIR)\"