OSDN Git Service

[Refactor] #37353 Visual Studio 2017 の C4701警告潰し。/ Fix warning C4701 in Visual Studio...
authorDeskull <deskull@users.sourceforge.jp>
Wed, 12 Dec 2018 13:11:02 +0000 (22:11 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Wed, 12 Dec 2018 13:11:02 +0000 (22:11 +0900)
src/cave.c
src/dungeon.c
src/files.c
src/mind.c
src/rooms-vault.c
src/spells2.c

index 068557a..ab8f673 100644 (file)
@@ -1760,8 +1760,8 @@ void prt_path(POSITION y, POSITION x)
                        TERM_COLOR a = default_color;
                        char c;
 
-                       TERM_COLOR ta;
-                       char tc;
+                       TERM_COLOR ta = default_color;
+                       char tc = '*';
 
                        if (c_ptr->m_idx && m_list[c_ptr->m_idx].ml)
                        {
index e48c757..1790122 100644 (file)
@@ -1265,7 +1265,7 @@ static object_type *choose_cursed_obj_name(BIT_FLAGS flag)
                                        (flag == TRC_FAST_DIGEST) || 
                                        (flag == TRC_SLOW_REGEN) )
                {
-                       u32b cf;
+                       u32b cf = 0L;
                        BIT_FLAGS flgs[TR_FLAG_SIZE];
                        object_flags(o_ptr, flgs);
                        switch (flag)
index f27b2da..6f5d75f 100644 (file)
@@ -4351,7 +4351,7 @@ static void dump_aux_class_special(FILE *fff)
        else if (p_ptr->pclass == CLASS_MAGIC_EATER)
        {
                char s[EATER_EXT][MAX_NLEN];
-               OBJECT_TYPE_VALUE tval;
+               OBJECT_TYPE_VALUE tval = 0;
                int ext;
                KIND_OBJECT_IDX k_idx;
                OBJECT_SUBTYPE_VALUE i;
index 4eef34b..d910368 100644 (file)
@@ -1557,7 +1557,7 @@ static bool cast_berserk_spell(int spell)
  */
 static bool cast_ninja_spell(int spell)
 {
-       POSITION x, y;
+       POSITION x = 0, y = 0;
        DIRECTION dir;
        PLAYER_LEVEL plev = p_ptr->lev;
 
@@ -1680,8 +1680,8 @@ static bool cast_ninja_spell(int spell)
                ty = target_row, tx = target_col;
                for (i = 1; i < path_n; i++)
                {
-                       int ny = GRID_Y(path_g[i]);
-                       int nx = GRID_X(path_g[i]);
+                       POSITION ny = GRID_Y(path_g[i]);
+                       POSITION nx = GRID_X(path_g[i]);
                        cave_type *c_ptr = &cave[ny][nx];
 
                        if (in_bounds(ny, nx) && cave_empty_bold(ny, nx) &&
index 1ca6efc..95f1490 100644 (file)
@@ -24,7 +24,7 @@ static void build_bubble_vault(POSITION x0, POSITION y0, POSITION xsize, POSITIO
        coord center[BUBBLENUM];\r
 \r
        int i, j;\r
-       POSITION x, y;\r
+       POSITION x = 0, y = 0;\r
        u16b min1, min2, temp;\r
        bool done;\r
 \r
index 139786f..be1e27a 100644 (file)
@@ -529,7 +529,6 @@ bool detect_monsters_nonliving(POSITION range)
        for (i = 1; i < m_max; i++)
        {
                monster_type *m_ptr = &m_list[i];
-               monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
                /* Skip dead monsters */
                if (!m_ptr->r_idx) continue;