From 148146d94eb3ce2d08cc5383c375b9a7bcd52da9 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 21 Jan 2019 11:00:31 +0100 Subject: [PATCH 1/3] BUG 2540: Vertraute ohne Auraim CR repariert --- src/creport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/creport.c b/src/creport.c index 3ac9dffe9..b3445f5e1 100644 --- a/src/creport.c +++ b/src/creport.c @@ -915,7 +915,8 @@ void cr_output_unit(stream *out, const faction * f, if (fval(u, UFL_HUNGER) && (u->faction == f)) { stream_printf(out, "1;hunger\n"); } - if (is_mage(u)) { + mage = get_mage(u); + if (mage) { stream_printf(out, "%d;Aura\n", get_spellpoints(u)); stream_printf(out, "%d;Auramax\n", max_spellpoints_depr(u->region, u)); } @@ -957,7 +958,6 @@ void cr_output_unit(stream *out, const faction * f, } /* spells that this unit can cast */ - mage = get_mage(u); if (mage) { int maxlevel = effskill(u, SK_MAGIC, 0); cr_output_spells(out, u, maxlevel); From dba46ac4806de394164da155d6dc8d69635eb418 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 22 Jan 2019 16:17:16 +0100 Subject: [PATCH 2/3] add scan-build to travis build --- .travis.yml | 1 + s/travis-build | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6a21d0e4..5f7569cec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,7 @@ addons: - libxml2-dev - valgrind - cppcheck + - clang-tools - shellcheck os: - linux diff --git a/s/travis-build b/s/travis-build index 64b278710..7bbfbe85a 100755 --- a/s/travis-build +++ b/s/travis-build @@ -33,8 +33,9 @@ set -e [ -z $BUILD ] && BUILD=Debug ; export BUILD # cppcheck_tests s/cmake-init --db=sqlite -s/build -cd process +cd Debug +scan-build make +cd ../process make cd $ROOT inifile From ef8139067efca5478ffb2e4159d6a34c4071f525 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Tue, 22 Jan 2019 16:48:22 +0100 Subject: [PATCH 3/3] Remove missing package Ok --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5f7569cec..c6a21d0e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,7 +16,6 @@ addons: - libxml2-dev - valgrind - cppcheck - - clang-tools - shellcheck os: - linux