From 2823c7bffbbe4f17b5a291a41c285b2b756a46e8 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:23:56 -0400 Subject: [PATCH 01/10] build: fixup warnings from GCC 6.2.1 --- src/d_net.c | 2 ++ src/hardware/r_opengl/r_opengl.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/d_net.c b/src/d_net.c index fae1ea31..7f16c302 100644 --- a/src/d_net.c +++ b/src/d_net.c @@ -991,12 +991,14 @@ void Command_Droprate(void) packetdroprate = droprate; } +#ifndef NONET static boolean ShouldDropPacket(void) { return (packetdropquantity[netbuffer->packettype]) || (packetdroprate != 0 && rand() < (RAND_MAX * (packetdroprate / 100.f))) || packetdroprate == 100; } #endif +#endif // // HSendPacket diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 54dd9485..3a0bf705 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -1836,7 +1836,7 @@ EXPORT void HWRAPI(SetSpecialState) (hwdspecialstate_t IdState, INT32 Value) } } -static inline void DrawMD2Ex(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration, UINT32 tics, md2_frame_t *nextframe, FTransform *pos, float scale, UINT8 flipped, UINT8 *color) +static void DrawMD2Ex(INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 duration, UINT32 tics, md2_frame_t *nextframe, FTransform *pos, float scale, UINT8 flipped, UINT8 *color) { INT32 val, count, pindex; GLfloat s, t; From b22417bcfab06739a4ed692cecc29652905baffe Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:26:37 -0400 Subject: [PATCH 02/10] appveyor: buildbot now using GCC 6.3, not 5.3 --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 25b95d29..b0544a90 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,7 +47,7 @@ before_build: - upx -V - ccache -V - ccache -s -- set SRB2_MFLAGS=-C src MINGW=1 WARNINGMODE=1 GCC53=1 CCACHE=1 +- set SRB2_MFLAGS=-C src MINGW=1 WARNINGMODE=1 GCC63=1 CCACHE=1 build_script: - cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean From e0b2a4a7791c846ec13927f0f680e36ebe058d21 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:45:18 -0400 Subject: [PATCH 03/10] build: add suport for GCC 6.3 --- src/Makefile.cfg | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 72404bec..d5cb112b 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -7,6 +7,23 @@ # and other things # + +ifdef GCC63 +GCC62=1 +endif + +ifdef GCC62 +GCC61=1 +endif + +ifdef GCC61 +GCC54=1 +endif + +ifdef GCC54 +GCC53=1 +ENDIF + ifdef GCC53 GCC52=1 endif @@ -176,6 +193,9 @@ endif ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif +ifdef GCC62 + WFALGS+=-Wno-tautological-compare +endif WFLAGS+=$(OLDWFLAGS) From b01d5da60ffb20ee1efe4d82262129fd66707be4 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 20:23:30 -0400 Subject: [PATCH 04/10] build: fixup GCC54 endif --- src/Makefile.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index d5cb112b..781076aa 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -22,7 +22,7 @@ endif ifdef GCC54 GCC53=1 -ENDIF +endif ifdef GCC53 GCC52=1 From 42ecca817d40f49404359ae402b359b42e98e1a9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 20:43:35 -0400 Subject: [PATCH 05/10] build: disable tautological-compare and logical-op --- src/Makefile.cfg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 781076aa..a891a755 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -193,8 +193,11 @@ endif ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif -ifdef GCC62 - WFALGS+=-Wno-tautological-compare +ifdef GCC54 + WFALGS+=-Wno-error=logical-op +endif +ifdef GCC61 + WFALGS+=-Wno-error=tautological-compare endif WFLAGS+=$(OLDWFLAGS) From 81fe46213d1b77cc296265a969f74cb26f5d9998 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 20:51:45 -0400 Subject: [PATCH 06/10] build: do not overwrite the -Wno-error switchs --- src/Makefile.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index a891a755..60d96575 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -187,6 +187,7 @@ endif ifdef ERRORMODE WFLAGS+=-Werror endif +WFLAGS+=$(OLDWFLAGS) ifdef GCC43 #WFLAGS+=-Wno-error=clobbered endif @@ -199,7 +200,6 @@ endif ifdef GCC61 WFALGS+=-Wno-error=tautological-compare endif -WFLAGS+=$(OLDWFLAGS) #indicate platform and what interface use with From 6bb7a636dc808bc4ca086ff448e7ef4ead510610 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:02:05 -0400 Subject: [PATCH 07/10] appveyor: output commands passed to GCCwq --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index b0544a90..269b7698 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ before_build: build_script: - cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean -- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k +- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k ECHO=1 after_build: - ccache -s From 9cac1e9e6226a26510b5b20c64f5bd353890fdac Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:09:06 -0400 Subject: [PATCH 08/10] build: fixup WFALGS/WFLAGS mistake --- src/Makefile.cfg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 60d96575..e232c4a1 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -181,13 +181,17 @@ ifdef GCC45 WFLAGS+=-Wunsuffixed-float-constants endif endif + ifdef NOLDWARNING LDFLAGS+=-Wl,--as-needed endif + ifdef ERRORMODE WFLAGS+=-Werror endif + WFLAGS+=$(OLDWFLAGS) + ifdef GCC43 #WFLAGS+=-Wno-error=clobbered endif @@ -195,10 +199,10 @@ ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif ifdef GCC54 - WFALGS+=-Wno-error=logical-op + WFLAGS+=-Wno-error=logical-op endif ifdef GCC61 - WFALGS+=-Wno-error=tautological-compare + WFLAGS+=-Wno-error=tautological-compare endif From 4e8972cd24c291f22d5932415bcafe0d991294af Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:16:37 -0400 Subject: [PATCH 09/10] build: no warning or error about logical-ip or tautological-compare --- src/Makefile.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index e232c4a1..80d018c4 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -199,10 +199,10 @@ ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif ifdef GCC54 - WFLAGS+=-Wno-error=logical-op + WFLAGS+=-Wno-logical-op -Wno-error=logical-op endif ifdef GCC61 - WFLAGS+=-Wno-error=tautological-compare + WFLAGS+=-Wno-tautological-compare -Wno-error=tautological-compare endif From 538eac7a471c61e13ffcbae81183de8e32c1d322 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 21:17:07 -0400 Subject: [PATCH 10/10] appveyor: disable command output --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 269b7698..b0544a90 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -51,7 +51,7 @@ before_build: build_script: - cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 clean -- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k ECHO=1 +- cmd: mingw32-make.exe %SRB2_MFLAGS% %CONFIGURATION%=1 ERRORMODE=1 -k after_build: - ccache -s