OSDN Git Service

[Refactor] #40045 GCCでのコンパイル警告を除去 / Removed compilation warnings on GCC
authorHourier <hourier@users.sourceforge.jp>
Fri, 21 Feb 2020 11:20:22 +0000 (20:20 +0900)
committerHourier <hourier@users.sourceforge.jp>
Fri, 21 Feb 2020 11:20:22 +0000 (20:20 +0900)
src/bldg.c
src/spells-floor.c
src/spells2.c
src/trap.c
src/wizard2.c

index aadc457..62ee5db 100644 (file)
@@ -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;
index 1a3099c..99de94d 100644 (file)
@@ -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;
 
index d8cf429..f3018dd 100644 (file)
@@ -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))
index 0db8229..f00fe8c 100644 (file)
@@ -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);
index 282a672..7088a24 100644 (file)
@@ -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 } } }
 };
 
 /*!