From 686268b2f90de54a39000b5424fe02c125d6c034 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sun, 3 Oct 2021 21:39:43 +0200 Subject: [PATCH 1/3] Remove incorrect changelog entries --- CHANGELOG.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b7ef5b62a..9a813d704f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,6 @@ Bug #5508: Engine binary links to Qt without using it Bug #5596: Effects in constant spells should not be merged Bug #5621: Drained stats cannot be restored - Bug #5755: Active grid object paging - disappearing textures Bug #5766: Active grid object paging - disappearing textures Bug #5788: Texture editing parses the selected indexes wrongly Bug #5801: A multi-effect spell with the intervention effects and recall always favors Almsivi intervention @@ -45,7 +44,6 @@ Bug #6174: Spellmaking and Enchanting sliders differences from vanilla Bug #6184: Command and Calm and Demoralize and Frenzy and Rally magic effects inconsistencies with vanilla Bug #6197: Infinite Casting Loop - Bug #6223: Some Constant Effect Bound Items inconsistencies Bug #6273: Respawning NPCs rotation is inconsistent Bug #6282: Laura craft doesn't follow the player character Bug #6283: Avis Dorsey follows you after her death @@ -59,7 +57,6 @@ Feature #4297: Implement APPLIED_ONCE flag for magic effects Feature #4414: Handle duration of EXTRA SPELL magic effect Feature #4595: Unique object identifier - Feature #4737: Handle instance move from one cell to another Feature #5198: Implement "Magic effect expired" event Feature #5454: Clear active spells from actor when he disappears from scene Feature #5489: MCP: Telekinesis fix for activators From d680aa26e9033615befede2e915dc0b67a69869c Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Sun, 3 Oct 2021 21:58:10 +0200 Subject: [PATCH 2/3] Disallow switch fallthrough --- CMakeLists.txt | 4 ++++ apps/opencs/model/world/refidadapterimp.hpp | 1 + apps/openmw/mwmechanics/spelleffects.cpp | 2 ++ 3 files changed, 7 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b8350a04b..ae4584a4cd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -543,6 +543,10 @@ if (BUILD_OPENCS) add_subdirectory (extern/osgQt) endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=implicit-fallthrough") +endif() + # Components add_subdirectory (components) diff --git a/apps/opencs/model/world/refidadapterimp.hpp b/apps/opencs/model/world/refidadapterimp.hpp index 84fec5bed0..c35d3c5a7c 100644 --- a/apps/opencs/model/world/refidadapterimp.hpp +++ b/apps/opencs/model/world/refidadapterimp.hpp @@ -1870,6 +1870,7 @@ namespace CSMWorld content.mWander.mDuration = static_cast(value.toInt()); else return; // return without saving + break; case 3: if (content.mType == ESM::AI_Wander) content.mWander.mTimeOfDay = static_cast(value.toInt()); diff --git a/apps/openmw/mwmechanics/spelleffects.cpp b/apps/openmw/mwmechanics/spelleffects.cpp index 24816b9ed1..fa2733d837 100644 --- a/apps/openmw/mwmechanics/spelleffects.cpp +++ b/apps/openmw/mwmechanics/spelleffects.cpp @@ -453,6 +453,7 @@ void applyMagicEffect(const MWWorld::Ptr& target, const MWWorld::Ptr& caster, co } addBoundItem(world->getStore().get().find("sMagicBoundRightGauntletID")->mValue.getString(), target); // left gauntlet added below + [[fallthrough]]; case ESM::MagicEffect::BoundDagger: case ESM::MagicEffect::BoundLongsword: case ESM::MagicEffect::BoundMace: @@ -920,6 +921,7 @@ void removeMagicEffect(const MWWorld::Ptr& target, ActiveSpells::ActiveSpellPara break; case ESM::MagicEffect::BoundGloves: removeBoundItem(world->getStore().get().find("sMagicBoundRightGauntletID")->mValue.getString(), target); + [[fallthrough]]; case ESM::MagicEffect::BoundDagger: case ESM::MagicEffect::BoundLongsword: case ESM::MagicEffect::BoundMace: From a1825980c496eb100e719a918ab2cc9f96389f52 Mon Sep 17 00:00:00 2001 From: Evil Eye Date: Wed, 6 Oct 2021 17:28:48 +0200 Subject: [PATCH 3/3] Define OpenMW specific C++ flags --- CI/before_script.linux.sh | 1 + CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CI/before_script.linux.sh b/CI/before_script.linux.sh index bc0eb0013d..5d20fa75ce 100755 --- a/CI/before_script.linux.sh +++ b/CI/before_script.linux.sh @@ -32,6 +32,7 @@ declare -a CMAKE_CONF_OPTS=( -DCMAKE_INSTALL_PREFIX=install -DCMAKE_C_FLAGS='-Werror' -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" + -DOPENMW_CXX_FLAGS="-Werror=implicit-fallthrough" ) if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then diff --git a/CMakeLists.txt b/CMakeLists.txt index ae4584a4cd..2564379847 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -543,8 +543,8 @@ if (BUILD_OPENCS) add_subdirectory (extern/osgQt) endif() -if (CMAKE_CXX_COMPILER_ID STREQUAL GNU OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror=implicit-fallthrough") +if (OPENMW_CXX_FLAGS) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OPENMW_CXX_FLAGS}") endif() # Components