diff --git a/.travis.yml b/.travis.yml index 4b51120af4..3f46053eec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -46,7 +46,6 @@ matrix: compiler: gcc env: - GCC_VERSION=7 - - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=MinSizeRel" addons: apt: sources: @@ -58,15 +57,15 @@ matrix: - os: linux compiler: clang env: - - CLANG_VERSION=3.9 - - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DDYN_OPENAL=NO -DDYN_SNDFILE=NO -DDYN_MPG123=NO -DDYN_FLUIDSYNTH=NO" + - CLANG_VERSION=4.0 + - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=MinSizeRel -DDYN_OPENAL=NO -DDYN_SNDFILE=NO -DDYN_MPG123=NO -DDYN_FLUIDSYNTH=NO" addons: apt: sources: - ubuntu-toolchain-r-test - - llvm-toolchain-trusty-3.9 + - llvm-toolchain-trusty-4.0 packages: - - clang-3.9 + - clang-4.0 - libstdc++-5-dev - libsdl2-dev - libgme-dev diff --git a/src/p_ceiling.cpp b/src/p_ceiling.cpp index fcd2a54876..fb324b54a3 100644 --- a/src/p_ceiling.cpp +++ b/src/p_ceiling.cpp @@ -593,8 +593,9 @@ bool EV_CeilingCrushStop (int tag, bool remove) bool EV_StopCeiling(int tag, line_t *line) { + int sec; FSectorTagIterator it(tag, line); - while (int sec = it.Next()) + while ((sec = it.Next()) >= 0) { if (level.sectors[sec].ceilingdata) { diff --git a/src/p_floor.cpp b/src/p_floor.cpp index 63ebdc4af6..d0b6cb0773 100644 --- a/src/p_floor.cpp +++ b/src/p_floor.cpp @@ -570,8 +570,9 @@ bool EV_FloorCrushStop (int tag, line_t *line) // same as above but stops any floor mover that was active on the given sector. bool EV_StopFloor(int tag, line_t *line) { + int sec; FSectorTagIterator it(tag, line); - while (int sec = it.Next()) + while ((sec = it.Next()) >= 0) { if (level.sectors[sec].floordata) {