OSDN Git Service

[Fix] #39976 floor_type * 参照で警告を発する問題を修正.ついでに構造体宣言とや不要インクルード整理. / Fix warning referen...
authordeskull <deskull@users.sourceforge.jp>
Sun, 9 Feb 2020 12:55:17 +0000 (21:55 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Sun, 9 Feb 2020 12:55:17 +0000 (21:55 +0900)
src/cmd/cmd-gameoption.h
src/combat/melee.h
src/floor.h
src/monster.h
src/monsterrace.h
src/player-class.h
src/racial.c
src/scores.h
src/snipe.c
src/util.h
src/wizard1.c

index bfadb05..73893fb 100644 (file)
@@ -227,9 +227,7 @@ extern BIT_FLAGS window_mask[8];
  *     - Textual description
  */
 
-typedef struct option_type option_type;
-
-struct option_type
+ typedef struct option_type
 {
        bool    *o_var;
        byte    o_norm;
@@ -238,7 +236,7 @@ struct option_type
        byte    o_bit;
        concptr o_text;
        concptr o_desc;
-};
+} option_type;
 
 extern const option_type option_info[];
 extern const option_type cheat_info[CHEAT_MAX];
index 8979dba..9bb80f9 100644 (file)
@@ -128,8 +128,7 @@ extern const byte adj_dex_blow[];
 extern const byte blows_table[12][12];
 
 /* For Monk martial arts */
-typedef struct martial_arts martial_arts;
-struct martial_arts
+typedef struct martial_arts
 {
        concptr desc;       /* A verbose attack description */
        PLAYER_LEVEL min_level;  /* Minimum level to use */
@@ -137,15 +136,13 @@ struct martial_arts
        int dd;         /* Damage dice */
        int ds;         /* Damage sides */
        int effect;     /* Special effects */
-};
+} martial_arts;
 
-typedef struct mbe_info_type mbe_info_type;
-
-struct mbe_info_type
+typedef struct mbe_info_type
 {
        int power;        /* The attack "power" */
        int explode_type; /* Explosion effect */
-};
+} mbe_info_type;
 
 extern const martial_arts ma_blows[MAX_MA];
 extern const int monk_ave_damage[PY_MAX_LEVEL + 1][3];
index 1ad00c2..30aca92 100644 (file)
@@ -81,7 +81,7 @@
 #define REDRAW_MAX 2298
 
 
-typedef struct {
+typedef struct floor_type {
        DUNGEON_IDX dungeon_idx;
        grid_type *grid_array[MAX_HGT];
        DEPTH dun_level;                /*!< 現在の実ダンジョン階層 base_level の参照元となる / Current dungeon level */
index 0d63202..03f831a 100644 (file)
@@ -34,14 +34,14 @@ extern MONSTER_IDX hack_m_idx_ii;
  * of objects (if any) being carried by the monster (see above).
  */
 
+typedef struct floor_type floor_type;
 typedef struct monster_type monster_type;
 
-
 struct monster_type
 {
        MONRACE_IDX r_idx;              /* Monster race index 0 = dead. */
        MONRACE_IDX ap_r_idx;   /* Monster race appearance index */
-       struct floor_type *current_floor_ptr;
+       floor_type *current_floor_ptr;
 
        /* Sub-alignment flags for neutral monsters */
        #define SUB_ALIGN_NEUTRAL 0x0000
index 05235e6..eebdf28 100644 (file)
@@ -9,16 +9,13 @@
  *     - Damage Dice
  *     - Damage Sides
  */
-
-typedef struct monster_blow monster_blow;
-
-struct monster_blow
+typedef struct monster_blow
 {
        BLOW_METHOD method;
        BLOW_EFFECT effect;
        DICE_NUMBER d_dice;
        DICE_SID d_side;
-};
+} monster_blow;
 
 extern MONRACE_IDX max_r_idx;
 
index bdf7d53..4a81579 100644 (file)
@@ -1,6 +1,5 @@
 #pragma once
 #include "spells.h"
-#include "realm.h"
 
 /*
  * 職業ごとの選択可能な魔法領域現在の所 bitrh.c でのみ使用。
@@ -22,8 +21,6 @@
 #define CH_HISSATSU     0x10000
 #define CH_HEX          0x20000
 
-
-
  /*
   * Player class constants (hard-coded by save-files, arrays, etc)
   */
index 617d943..3588bb5 100644 (file)
@@ -225,14 +225,9 @@ static bool choose_kata(player_type *creature_ptr)
 
 
 /*!
- * @brief レイシャル・パワー情報のtypedef
- */
-typedef struct power_desc_type power_desc_type;
-
-/*!
  * @brief レイシャル・パワー情報の構造体定義
  */
-struct power_desc_type
+typedef struct power_desc_type
 {
        GAME_TEXT name[MAX_NLEN];      //!<レイシャル名
        PLAYER_LEVEL level;     //!<体得レベル
@@ -240,7 +235,7 @@ struct power_desc_type
        int stat;
        PERCENTAGE fail;
        int number;
-};
+} power_desc_type;
 
 
 /*!
index 0999e1f..8c84fc2 100644 (file)
  *
  * Note that "string comparisons" are thus valid on "pts".
  */
-
-typedef struct high_score high_score;
-
-struct high_score
+typedef struct high_score
 {
        GAME_TEXT what[8];              /* Version info (string) */
        GAME_TEXT pts[10];              /* Total Score (number) */
@@ -33,7 +30,7 @@ struct high_score
        GAME_TEXT max_dun[4];           /* Max Dungeon Level (number) */
 
        GAME_TEXT how[40];              /* Method of death (string) */
-};
+} high_score;
 
 #define MAX_HISCORES    999 /*!< スコア情報保存の最大数 / Maximum number of high scores in the high score file */
 
index d6d785b..148419e 100644 (file)
 
 #define MAX_SNIPE_POWERS 16
 
-/*! スナイパー技能情報のtypedef */
-typedef struct snipe_power snipe_power;
-
 /*! スナイパー技能情報の構造体 */
-struct snipe_power
+typedef struct snipe_power
 {
        PLAYER_LEVEL min_lev;
        MANA_POINT mana_cost;
        concptr name;
-};
+} snipe_power;
 
 /*! スナイパー技能の解説メッセージ */
 static concptr const snipe_tips[MAX_SNIPE_POWERS] =
index 909b383..7b1d96c 100644 (file)
 #endif
 
 
-  /*
-  * Sort-array element
-  */
-typedef struct tag_type tag_type;
-
-struct tag_type
+/*
+ * Sort-array element
+ */
+typedef struct tag_type
 {
        int tag;
        int index;
-};
+} tag_type;
 
 /*
  * An entry for the object/monster allocation functions
index 8cadc9f..39573ee 100644 (file)
@@ -517,14 +517,11 @@ static grouper group_artifact[] =
  * of textual names, where entry 'N' is assumed to be paired with
  * the flag whose value is "1L << N", but that requires hard-coding.
  */
-
-typedef struct flag_desc flag_desc;
-
-struct flag_desc
+typedef struct flag_desc
 {
        const int flag;
        concptr const desc;
-};
+} flag_desc;