OSDN Git Service

沢山ワーニング除去。
authoriks <iks@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 23 May 2002 15:53:23 +0000 (15:53 +0000)
committeriks <iks@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 23 May 2002 15:53:23 +0000 (15:53 +0000)
src/autopick.c
src/cmd4.c
src/dungeon.c
src/externs.h
src/files.c
src/init1.c
src/spells2.c
src/xtra1.c
src/z-term.c

index 0c17e23..dfc5b83 100644 (file)
@@ -776,7 +776,7 @@ static bool is_opt_confirm_destroy(object_type *o_ptr)
 /*
  *  Auto inscription
  */
-void auto_inscribe_item(s16b item, int idx)
+void auto_inscribe_item(int item, int idx)
 {
        object_type *o_ptr;
 
@@ -810,7 +810,7 @@ void auto_inscribe_item(s16b item, int idx)
 /*
  * Automatically destroy an item if it is to be destroyed
  */
-bool auto_destroy_item(s16b item, int autopick_idx)
+bool auto_destroy_item(int item, int autopick_idx)
 {
        char o_name[MAX_NLEN];
        object_type *o_ptr;
@@ -2062,7 +2062,7 @@ void do_cmd_edit_autopick()
                        else
                                strncpy(buf + sepa_length - 21, " (COMMAND MODE) ", 16);
 
-                       Term_putstr(0, hgt - 3, sepa_length, edit_mode ? TERM_YELLOW : TERM_WHITE, buf);
+                       Term_putstr(0, hgt - 3, sepa_length, (byte) (edit_mode ? TERM_YELLOW : TERM_WHITE), buf);
                }
                
                /* Dump up to 20, or hgt-4, lines of messages */
@@ -2628,7 +2628,7 @@ void do_cmd_edit_autopick()
 
                case KTRL('k'):
                        /* Kill rest of line */
-                       if (lines_list[cy][0] != '\0' && cx < strlen(lines_list[cy]))
+                       if (lines_list[cy][0] != '\0' && (unsigned int) cx < strlen(lines_list[cy]))
                        {
                                for (i = j = 0; lines_list[cy][i] && i < cx; i++)
                                {
index 0801e59..7be6917 100644 (file)
@@ -2406,7 +2406,6 @@ void do_cmd_pickpref(void)
 {
        char buf[80];
        errr err;
-       int i;
 
 #ifdef JP
        if(!get_check("¼«Æ°½¦¤¤ÀßÄê¥Õ¥¡¥¤¥ë¤ò¥í¡¼¥É¤·¤Þ¤¹¤«? ")) return;
@@ -3289,7 +3288,7 @@ void do_cmd_macros(void)
 }
 
 
-static void cmd_visuals_aux(char i, int *num, int max)
+static void cmd_visuals_aux(int i, int *num, int max)
 {
        if (iscntrl(i))
        {
index b1c64e4..e54e7b9 100644 (file)
@@ -1403,16 +1403,16 @@ static void check_music()
        shouhimana /= 9600;
        if(shouhimana < 1) shouhimana = 1;
         shouhimana *= 0x8000;
-        if ((p_ptr->csp < shouhimana / 0x10000) || (p_ptr->anti_magic))
+        if (((u16b)(p_ptr->csp) < (shouhimana / 0x10000)) || (p_ptr->anti_magic))
         {
                 stop_singing();
                return;
         }
         else
         {
-                p_ptr->csp -= shouhimana / 0x10000;
-               shouhimana = (shouhimana & 0xffff);
-               if (p_ptr->csp_frac < shouhimana)
+                       p_ptr->csp -= (u16b) (shouhimana / 0x10000);
+                       shouhimana = (shouhimana & 0xffff);
+                       if (p_ptr->csp_frac < shouhimana)
                {
                        p_ptr->csp--;
                        p_ptr->csp_frac += (u16b)(0x10000L - shouhimana);
index e0b96f6..efc920f 100644 (file)
@@ -545,8 +545,8 @@ extern cptr autopick_line_from_entry(autopick_type *entry);
 extern bool autopick_new_entry(autopick_type *entry, cptr str);
 extern void autopick_free_entry(autopick_type *entry);
 extern int is_autopick(object_type *o_ptr);
-extern void auto_inscribe_item(s16b item, int idx);
-extern bool auto_destroy_item(s16b item, int autopick_idx);
+extern void auto_inscribe_item(int item, int idx);
+extern bool auto_destroy_item(int item, int autopick_idx);
 extern void auto_pickup_items(cave_type *c_ptr);
 extern void autopick_entry_from_object(autopick_type *entry, object_type *o_ptr);
 extern void init_autopicker(void);
@@ -760,7 +760,7 @@ extern void place_closed_door(int y, int x);
 extern void generate_cave(void);
 
 /* init1.c */
-extern int color_char_to_attr(char c);
+extern byte color_char_to_attr(char c);
 extern errr process_dungeon_file(cptr name, int ymin, int xmin, int ymax, int xmax);
 
 /* init2.c */
index cdfa67c..8ed70be 100644 (file)
@@ -4322,10 +4322,10 @@ errr make_character_dump(FILE *fff)
                fprintf(fff, "%s\n", buf);
        }
 
-       for (i = 0; i < p_ptr->count / 80; i++)
+       for (i = 0; (unsigned int) i < (p_ptr->count / 80); i++)
                fprintf(fff, " ");
        fprintf(fff, "\n");
-       for (i = 0; i < p_ptr->count % 80; i++)
+       for (i = 0; (unsigned int) i < (p_ptr->count % 80); i++)
                fprintf(fff, " ");
 
        {
@@ -5331,7 +5331,7 @@ msg_format("'%s'
                                /* Color ? */
                                if (prefix(str + x, "[[[[["))
                                {
-                                       int c = color_char_to_attr(str[x + 5]);
+                                       byte c = color_char_to_attr(str[x + 5]);
                                        x += 6;
 
                                        /* Ok print the link name */
index 6325cbe..08ee3a7 100644 (file)
@@ -747,7 +747,7 @@ static bool add_name(u32b *offset, header *head, cptr buf)
  * Convert a "color letter" into an "actual" color
  * The colors are: dwsorgbuDWvyRGBU, as shown below
  */
-int color_char_to_attr(char c)
+byte color_char_to_attr(char c)
 {
        switch (c)
        {
@@ -1225,7 +1225,7 @@ errr parse_f_info(char *buf, header *head)
        /* Process 'G' for "Graphics" (one line only) */
        else if (buf[0] == 'G')
        {
-               int tmp;
+               byte tmp;
 
                /* Paranoia */
                if (!buf[2]) return (1);
@@ -1407,7 +1407,7 @@ errr parse_k_info(char *buf, header *head)
        else if (buf[0] == 'G')
        {
                char sym;
-               int tmp;
+               byte tmp;
 
                /* Paranoia */
                if (!buf[2]) return (1);
@@ -2239,7 +2239,7 @@ errr parse_r_info(char *buf, header *head)
        else if (buf[0] == 'G')
        {
                char sym;
-               int tmp;
+               byte tmp;
 
                /* Paranoia */
                if (!buf[2]) return (1);
index 396e11a..81e2023 100644 (file)
@@ -6289,7 +6289,7 @@ bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
 bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
 {
        int ly, lx, ld;
-       int ty, tx, y, x, dist;
+       int ty, tx, y, x;
        int i;
 
        int flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
index 40b6167..f393d58 100644 (file)
@@ -320,7 +320,7 @@ static void prt_stat(int stat)
 
 
 static struct {
-       int attr;
+       byte attr;
        cptr sstr;
        cptr lstr;
 } bar[]
index efbea47..3398203 100644 (file)
@@ -1734,7 +1734,7 @@ errr Term_fresh(void)
 #ifdef CHUUKEI
                                send_text_to_chuukei_server(tx, ty, csize, (old_aa[tx] & 0xf), &old_cc[tx]);
 #endif
-                               (void)((*Term->text_hook)(tx, ty, csize, (old_aa[tx] & 0xf), &old_cc[tx]));
+                               (void)((*Term->text_hook)(tx, ty, csize, (unsigned char) (old_aa[tx] & 0xf), &old_cc[tx]));
                        }
 
                        /* Hack -- erase the grid */