From b0f4bbb44b0020810c88ec2130f47097662bf406 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 2 Mar 2017 19:37:21 +0000 Subject: [PATCH 01/11] Played TD's Stormy Streets enough to know precipitation sprites didn't get an overflow test of their own (various large invisible blocks used in the level cause rain to make splashes high above the main level, high enough to make ghostly rain splash sprite artifacts appear sometimes in nearby areas) --- src/r_things.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/r_things.c b/src/r_things.c index 927217c5c..331febabd 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -891,12 +891,18 @@ static void R_DrawPrecipitationVisSprite(vissprite_t *vis) #endif fixed_t frac; patch_t *patch; + INT64 overflow_test; //Fab : R_InitSprites now sets a wad lump number patch = W_CacheLumpNum(vis->patch, PU_CACHE); if (!patch) return; + // Check for overflow + overflow_test = (INT64)centeryfrac - (((INT64)vis->texturemid*vis->scale)>>FRACBITS); + if (overflow_test < 0) overflow_test = -overflow_test; + if ((UINT64)overflow_test&0xFFFFFFFF80000000ULL) return; // fixed point mult would overflow + if (vis->transmap) { colfunc = fuzzcolfunc; From 2823c7bffbbe4f17b5a291a41c285b2b756a46e8 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Sun, 12 Mar 2017 17:23:56 -0400 Subject: [PATCH 02/11] 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 fae1ea311..7f16c302d 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 54dd94854..3a0bf7054 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 03/11] 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 25b95d292..b0544a90b 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 04/11] 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 72404becc..d5cb112b8 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 05/11] 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 d5cb112b8..781076aa2 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 06/11] 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 781076aa2..a891a7551 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 07/11] 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 a891a7551..60d96575a 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 08/11] 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 b0544a90b..269b7698d 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 09/11] 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 60d96575a..e232c4a1b 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 10/11] 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 e232c4a1b..80d018c4b 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 11/11] appveyor: disable command output --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 269b7698d..b0544a90b 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