From 1695014e0b8312f00bd262f1d2ed8f0fc82e7335 Mon Sep 17 00:00:00 2001 From: Hourier Date: Fri, 21 Feb 2020 20:20:22 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#40045=20GCC=E3=81=A7=E3=81=AE?= =?utf8?q?=E3=82=B3=E3=83=B3=E3=83=91=E3=82=A4=E3=83=AB=E8=AD=A6=E5=91=8A?= =?utf8?q?=E3=82=92=E9=99=A4=E5=8E=BB=20/=20Removed=20compilation=20warnin?= =?utf8?q?gs=20on=20GCC?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/bldg.c | 5 ++++- src/spells-floor.c | 3 --- src/spells2.c | 2 +- src/trap.c | 9 --------- src/wizard2.c | 4 ++-- 5 files changed, 7 insertions(+), 16 deletions(-) diff --git a/src/bldg.c b/src/bldg.c index aadc457e0..62ee5dbb7 100644 --- a/src/bldg.c +++ b/src/bldg.c @@ -1341,6 +1341,7 @@ static bool gamble_comm(player_type *player_ptr, int cmd) else if ((roll3 == 2) || (roll3 == 3) || (roll3 == 12)) win = FALSE; else + { do { msg_print(_("なにかキーを押すともう一回振ります。", "Hit any key to roll again")); @@ -1357,7 +1358,9 @@ static bool gamble_comm(player_type *player_ptr, int cmd) else if (roll3 == 7) win = FALSE; } while ((win != TRUE) && (win != FALSE)); - break; + } + + break; case BACT_SPIN_WHEEL: /* Spin the Wheel Game */ win = FALSE; diff --git a/src/spells-floor.c b/src/spells-floor.c index 1a3099cd0..99de94d6e 100644 --- a/src/spells-floor.c +++ b/src/spells-floor.c @@ -1046,9 +1046,6 @@ bool earthquake(player_type *caster_ptr, POSITION cy, POSITION cx, POSITION r, M /* Skip unaffected grids */ if (!map[16 + yy - cy][16 + xx - cx]) continue; - grid_type *g_ptr; - g_ptr = &floor_ptr->grid_array[yy][xx]; - /* Destroy location (if valid) */ if (!cave_valid_bold(floor_ptr, yy, xx)) continue; diff --git a/src/spells2.c b/src/spells2.c index d8cf42907..f3018dd6a 100644 --- a/src/spells2.c +++ b/src/spells2.c @@ -2408,7 +2408,7 @@ bool activate_ty_curse(player_type *target_ptr, bool stop_ty, int *count) BIT_FLAGS flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP); bool is_first_curse = TRUE; floor_type *floor_ptr = target_ptr->current_floor_ptr; - while (is_first_curse || one_in_(3) && !stop_ty) + while (is_first_curse || (one_in_(3) && !stop_ty)) { is_first_curse = FALSE; switch (randint1(34)) diff --git a/src/trap.c b/src/trap.c index 0db822993..f00fe8c06 100644 --- a/src/trap.c +++ b/src/trap.c @@ -382,15 +382,6 @@ static void hit_trap_slow(player_type *target_ptr) * @param turn_aux 状態異常の追加ターン量 * @return なし */ -static void hit_trap_set_abnormal_status(concptr trap_message, bool resist, bool(*set_status)(IDX), IDX turn_aux) -{ - msg_print(trap_message); - if (!resist) - { - set_status(turn_aux); - } -} - static void hit_trap_set_abnormal_status_p(player_type *trapped_ptr, concptr trap_message, bool resist, bool(*set_status)(player_type *, IDX), IDX turn_aux) { msg_print(trap_message); diff --git a/src/wizard2.c b/src/wizard2.c index 282a67265..7088a24ed 100644 --- a/src/wizard2.c +++ b/src/wizard2.c @@ -73,8 +73,8 @@ typedef struct debug_spell_command #define SPELL_MAX 2 debug_spell_command debug_spell_commands_list[SPELL_MAX] = { - { 2, "vanish dungeon", {.spell2 = vanish_dungeon} }, - { 3, "true healing", {.spell3 = true_healing} } + { 2, "vanish dungeon", {.spell2 = { vanish_dungeon } } }, + { 3, "true healing", {.spell3 = { true_healing } } } }; /*! -- 2.11.0