From 5ad66d6b7adb38f22c69a96e922d09995f94fabc Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Fri, 8 Dec 2017 21:08:45 +0100 Subject: [PATCH] cppcheck style fixes --- src/kernel/faction.c | 2 +- src/move.c | 1 + src/spells.c | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/kernel/faction.c b/src/kernel/faction.c index 00b62627f..8da74e80e 100755 --- a/src/kernel/faction.c +++ b/src/kernel/faction.c @@ -195,7 +195,7 @@ const char *factionname(const faction * f) char *ibuf = idbuf[(++nextbuf) % 8]; if (f && f->name) { - slprintf(ibuf, sizeof(name), "%s (%s)", f->name, itoa36(f->no)); + slprintf(ibuf, sizeof(idbuf[0]), "%s (%s)", f->name, itoa36(f->no)); } else { strcpy(ibuf, "Unbekannte Partei (?)"); diff --git a/src/move.c b/src/move.c index 798c3da27..65c047530 100644 --- a/src/move.c +++ b/src/move.c @@ -1751,6 +1751,7 @@ static void sail(unit * u, order * ord, region_list ** routep, bool drifting) * befahrene Region. */ while (next_point && current_point != next_point && step < k) { + int reason; const terrain_type *tthis = current_point->terrain; /* these values need to be updated if next_point changes (due to storms): */ const terrain_type *tnext = next_point->terrain; diff --git a/src/spells.c b/src/spells.c index 833061b0a..7f21e8654 100644 --- a/src/spells.c +++ b/src/spells.c @@ -5541,8 +5541,6 @@ int sp_showastral(castorder * co) free_regionlist(rl); return cast_level; - UNUSED_ARG(co); - return 0; } #endif