From 56e8f09ae8335327cf6a8c7484ead411a09c84f9 Mon Sep 17 00:00:00 2001 From: Alam Arias Date: Mon, 4 Mar 2019 16:33:06 -0500 Subject: [PATCH 1/4] fixed compiling for MSVC 2017 --- src/hardware/r_opengl/r_opengl.c | 4 ++-- src/k_kart.c | 3 ++- src/p_user.c | 2 +- src/r_things.c | 3 ++- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index 3a8be6a0..0c4dfdce 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2056,7 +2056,7 @@ EXPORT void HWRAPI(DrawMD2) (INT32 *gl_cmd_buffer, md2_frame_t *frame, FTransfor EXPORT void HWRAPI(SetTransform) (FTransform *stransform) { static boolean special_splitscreen; - float used_fov; + double used_fov; pglLoadIdentity(); if (stransform) { @@ -2088,7 +2088,7 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform) pglLoadIdentity(); if (special_splitscreen) { - used_fov = atan(tan(used_fov*M_PI/360)*0.8)*360/M_PI; + used_fov = atan(tan(used_fov*M_PIl/360)*0.8)*360/M_PIl; GLPerspective(used_fov, 2*ASPECT_RATIO); } else diff --git a/src/k_kart.c b/src/k_kart.c index 8e607191..f5fe06bc 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -1191,10 +1191,11 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) return; { // Normalize distance to the sum of the two objects' radii, since in a perfect world that would be the distance at the point of collision... - fixed_t dist = P_AproxDistance(distx, disty) ?: 1; + fixed_t dist = P_AproxDistance(distx, disty); fixed_t nx = FixedDiv(distx, dist); fixed_t ny = FixedDiv(disty, dist); + dist = dist ? dist : 1; distx = FixedMul(mobj1->radius+mobj2->radius, nx); disty = FixedMul(mobj1->radius+mobj2->radius, ny); diff --git a/src/p_user.c b/src/p_user.c index e26acdfd..7350b921 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6662,7 +6662,7 @@ static void P_MovePlayer(player_t *player) //CONS_Printf("leftover turn (%s): %5d or %4d%%\n", // player_names[player-players], // (INT16) (cmd->angleturn - (player->mo->angle>>16)), - // (INT16) (cmd->angleturn - (player->mo->angle>>16)) * 100 / (angle_diff ?: 1)); + // (INT16) (cmd->angleturn - (player->mo->angle>>16)) * 100 / (angle_diff ? angle_diff : 1)); } } diff --git a/src/r_things.c b/src/r_things.c index e4eaf413..59a904cb 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -1314,7 +1314,8 @@ static void R_ProjectSprite(mobj_t *thing) if (max(tz, tz2) < FixedMul(MINZ, this_scale)) // non-papersprite clipping is handled earlier return; - scalestep = (yscale2 - yscale)/(x2 - x1) ?: 1; + scalestep = (yscale2 - yscale)/(x2 - x1); + scalestep = scalestep ? scalestep : 1; // The following two are alternate sorting methods which might be more applicable in some circumstances. TODO - maybe enable via MF2? // sortscale = max(yscale, yscale2); From 145ccfd4056018bcda1020050a7eee9a8f519ea9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 4 Mar 2019 16:44:15 -0500 Subject: [PATCH 2/4] no more floating constants warnings, and disable bad array bounds warnings --- src/Makefile.cfg | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index 9e624cc7..b6faf446 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -189,12 +189,6 @@ ifdef GCC46 WFLAGS+=-Wno-suggest-attribute=noreturn endif -ifndef MINGW -ifdef GCC45 -WFLAGS+=-Wunsuffixed-float-constants -endif -endif - ifdef NOLDWARNING LDFLAGS+=-Wl,--as-needed endif @@ -208,6 +202,9 @@ WFLAGS+=$(OLDWFLAGS) ifdef GCC43 #WFLAGS+=-Wno-error=clobbered endif +ifdef GCC44 + WFLAGS+=-Wno-error=array-bounds +endif ifdef GCC46 WFLAGS+=-Wno-error=suggest-attribute=noreturn endif From 67e246cd53aea71e78bed11d0dd61e529b77b45b Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 4 Mar 2019 16:45:24 -0500 Subject: [PATCH 3/4] No more errors for VC6 support --- src/Makefile.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.cfg b/src/Makefile.cfg index b6faf446..236d7ae2 100644 --- a/src/Makefile.cfg +++ b/src/Makefile.cfg @@ -116,6 +116,7 @@ WFLAGS+=-Wfloat-equal #WFLAGS+=-Wtraditional ifdef VCHELP WFLAGS+=-Wdeclaration-after-statement + WFLAGS+=-Wno-error=declaration-after-statement endif WFLAGS+=-Wundef ifndef GCC295 From 3fa175170624527bbca9ab140b966899d0fe2b13 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Mon, 4 Mar 2019 16:51:39 -0500 Subject: [PATCH 4/4] CircleCi: we need SSH for buildbot --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3129c3bd..c3674a9e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -36,7 +36,7 @@ jobs: - v1-SRB2-APT - run: name: Install SDK - command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx + command: apt-get -qq -y --no-install-recommends install git build-essential nasm libpng12-dev:i386 libsdl2-mixer-dev:i386 libgme-dev:i386 gettext ccache wget gcc-multilib upx openssh-client - save_cache: key: v1-SRB2-APT paths: