Changeset 930

Show
Ignore:
Timestamp:
05/17/08 11:34:20 (4 months ago)
Author:
takkaria
Message:

Clear up yet more warnings and whitespace issues.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/birth.c

    r918 r930  
    119119{ 
    120120        int i; 
    121          
     121 
    122122    /* The initialisation is just paranoia - structure assignment is 
    123123           (perhaps) not strictly defined to work with uninitialised parts 
    124124           of structures. */ 
    125         birther temp = { 0 }; 
     125        birther temp; 
     126        WIPE(&temp, birther); 
    126127 
    127128        /*** Save the current data if we'll need it later ***/ 
  • trunk/src/cave.c

    r918 r930  
    22412241static bool ang_sort_comp_hook_longs(const void *u, const void *v, int a, int b) 
    22422242{ 
    2243         long *x = (long*)(u); 
     2243        long *x = (const long *)(u); 
    22442244 
    22452245        /* Unused parameter */ 
  • trunk/src/cmd0.c

    r918 r930  
    420420        const command_type *commands = menu->menu_data; 
    421421 
     422        (void)width; 
     423 
    422424        /* Write the description */ 
    423425        Term_putstr(col, row, -1, attr, commands[oid].desc); 
     
    445447static bool cmd_sub_action(char cmd, void *db, int oid) 
    446448{ 
     449        (void)db; 
     450        (void)oid; 
     451 
    447452        /* Only handle enter */ 
    448453        if (cmd == '\n' || cmd == '\r') 
    449         { 
    450454                return TRUE; 
    451         } 
    452455        else 
    453         { 
    454456                return FALSE; 
    455         } 
    456457} 
    457458 
     
    518519{ 
    519520        byte attr = (cursor ? TERM_L_BLUE : TERM_WHITE); 
     521        (void)menu; 
     522        (void)width; 
    520523        Term_putstr(col, row, -1, attr, cmds_all[oid].name); 
    521524} 
  • trunk/src/cmd3.c

    r918 r930  
    714714bool ang_sort_comp_hook(const void *u, const void *v, int a, int b) 
    715715{ 
    716         u16b *who = (u16b*)(u); 
    717  
    718         u16b *why = (u16b*)(v); 
     716        u16b *who = (const u16b *)(u); 
     717        u16b *why = (const u16b *)(v); 
    719718 
    720719        int w1 = who[a]; 
  • trunk/src/game-event.c

    r918 r930  
    9393void event_add_handler_set(game_event_type *type, size_t n_types, game_event_handler *fn, void *user) 
    9494{ 
    95         int i; 
     95        size_t i; 
    9696 
    9797        for (i = 0; i < n_types; i++) 
    98         { 
    9998                event_add_handler(type[i], fn, user); 
    100         } 
    10199} 
    102100 
    103101void event_remove_handler_set(game_event_type *type, size_t n_types, game_event_handler *fn, void *user) 
    104102{ 
    105         int i; 
     103        size_t i; 
    106104 
    107105        for (i = 0; i < n_types; i++) 
    108         { 
    109106                event_remove_handler(type[i], fn, user); 
    110         } 
    111107} 
    112108 
  • trunk/src/loadsave.c

    r928 r930  
    12371237        { 
    12381238                for (j = 0; j < DUNGEON_WID; j++) 
    1239                         cave_set_feat(i, j, *((byte *)(buf + (i * DUNGEON_WID) + j))); 
     1239                        cave_set_feat(i, j, *((const byte *)(buf + (i * DUNGEON_WID) + j))); 
    12401240        } 
    12411241 
  • trunk/src/save.c

    r918 r930  
    815815        u32b tmp32u; 
    816816 
     817        u32b tmp32v; 
     818 
    817819        /* Guess at the current time */ 
    818820        now = time((time_t *)0); 
     
    10011003 
    10021004        /* Dump the history entries one-by-one */ 
    1003         for (i = 0; i < tmp32u; i++) 
    1004         { 
    1005                 wr_u16b(history_list[i].type); 
    1006                 wr_s32b(history_list[i].turn); 
    1007                 wr_s16b(history_list[i].dlev); 
    1008                 wr_s16b(history_list[i].clev); 
    1009                 wr_byte(history_list[i].a_idx); 
    1010                 wr_string(history_list[i].event); 
     1005        for (tmp32v = 0; tmp32v < tmp32u; tmp32v++) 
     1006        { 
     1007                wr_u16b(history_list[tmp32v].type); 
     1008                wr_s32b(history_list[tmp32v].turn); 
     1009                wr_s16b(history_list[tmp32v].dlev); 
     1010                wr_s16b(history_list[tmp32v].clev); 
     1011                wr_byte(history_list[tmp32v].a_idx); 
     1012                wr_string(history_list[tmp32v].event); 
    10111013        } 
    10121014 
  • trunk/src/spells2.c

    r918 r930  
    10161016        bool detect = FALSE; 
    10171017 
     1018        (void)aware; 
     1019 
    10181020        /* Pick an area to map */ 
    10191021        y1 = p_ptr->py - DETECT_DIST_Y; 
     
    10561058        } 
    10571059 
    1058         /* Rescan the map for the new dtrap edge */  
    1059         for (y = y1-1; y < y2+1; y++)  
    1060         {  
    1061                 for (x = x1-1; x < x2+1; x++)  
    1062                 {  
    1063                         if (!in_bounds_fully(y, x)) continue;  
    1064                   
    1065                         /* Redraw */  
    1066                         lite_spot(y, x);  
    1067                 }  
    1068         }  
    1069                   
     1060        /* Rescan the map for the new dtrap edge */ 
     1061        for (y = y1 - 1; y < y2 + 1; y++) 
     1062        { 
     1063                for (x = x1 - 1; x < x2 + 1; x++) 
     1064                { 
     1065                        if (!in_bounds_fully(y, x)) continue; 
     1066 
     1067                        /* Redraw */ 
     1068                        lite_spot(y, x); 
     1069                } 
     1070        } 
     1071 
    10701072 
    10711073        /* Describe */ 
    10721074        if (detect) 
    10731075                msg_print("You sense the presence of traps!"); 
     1076 
     1077        /* Trap detection always makes you aware, even if no traps are present */ 
    10741078        else 
    1075                 /* Trap detection always makes you aware, even if no traps are present */ 
    10761079                msg_print("You sense no traps."); 
    10771080 
  • trunk/src/store.c

    r918 r930  
    477477        assert(max > 1); 
    478478 
    479         for (i = 0; i < max; i++) 
     479        for (i = 0; i < times; i++) 
    480480                t += randint0(max); 
    481481 
  • trunk/src/wiz-stats.c

    r918 r930  
    1616 */ 
    1717#include "angband.h" 
     18#include "cmds.h" 
    1819#include "wizard.h" 
    1920#include "tvalsval.h" 
  • trunk/src/xtra1.c

    r918 r930  
    16961696void redraw_stuff(void) 
    16971697{ 
    1698         int i; 
    1699          
     1698        size_t i; 
     1699 
    17001700        /* Redraw stuff */ 
    17011701        if (!p_ptr->redraw) return; 
     
    17251725        p_ptr->redraw = 0; 
    17261726 
    1727         /*  
     1727        /* 
    17281728         * Do any plotting, etc. delayed from earlier - this set of updates 
    1729          * is over.  
     1729         * is over. 
    17301730         */ 
    17311731        event_signal(EVENT_END); 
     
    17341734 
    17351735/* 
    1736  * Handle "p_ptr->update" and "p_ptr->redraw"  
     1736 * Handle "p_ptr->update" and "p_ptr->redraw" 
    17371737 */ 
    17381738void handle_stuff(void) 
  • trunk/src/z-util.c

    r918 r930  
    9090char *my_stristr(const char *string, const char *pattern) 
    9191{ 
    92       char *pptr, *sptr, *start; 
     92      const char *pptr, *sptr; 
     93      char *start; 
    9394 
    9495      for (start = (char *)string; *start != 0; start++) 
     
    101102                  return NULL; 
    102103 
    103             pptr = (char *)pattern; 
    104             sptr = (char *)start; 
     104            pptr = (const char *)pattern; 
     105            sptr = (const char *)start; 
    105106 
    106107            while (toupper((unsigned char)*sptr) == toupper((unsigned char)*pptr))