diff options
author | Bardur Arantsson <bardur@scientician.net> | 2011-04-21 16:12:21 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-03-29 20:57:29 +0200 |
commit | 30b5c52fc1370065bed0ba0a4b22329556fb0592 (patch) | |
tree | df03f621d7ad9d2f0462a4b70477b73c85cce048 /src | |
parent | b102a2e0aeb70e93a1122f42e00a7b672f718a07 (diff) |
Clear up Clang warnings.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd2.c | 2 | ||||
-rw-r--r-- | src/cmd4.c | 4 | ||||
-rw-r--r-- | src/init1.c | 6 | ||||
-rw-r--r-- | src/z-virt.h | 20 |
4 files changed, 16 insertions, 16 deletions
@@ -3550,7 +3550,7 @@ void do_cmd_throw(void) * Hack -- If rods or wands are thrown, the total maximum timeout or * charges need to be allocated between the two stacks. */ - if ((o_ptr->tval == TV_WAND)) + if (o_ptr->tval == TV_WAND) { q_ptr->pval = o_ptr->pval / o_ptr->number; @@ -919,7 +919,7 @@ static void do_cmd_options_win(void) cptr s = angband_term_name[j]; /* Use color */ - if ((j == x)) a = TERM_L_BLUE; + if (j == x) a = TERM_L_BLUE; /* Window name, staggered, centered */ Term_putstr(35 + j * 5 - strlen(s) / 2, 2 + j % 2, -1, a, s); @@ -933,7 +933,7 @@ static void do_cmd_options_win(void) cptr str = window_flag_desc[i]; /* Use color */ - if ((i == y)) a = TERM_L_BLUE; + if (i == y) a = TERM_L_BLUE; /* Unused option */ if (!str) str = "(Unused option)"; diff --git a/src/init1.c b/src/init1.c index 61ef7c43..7446b189 100644 --- a/src/init1.c +++ b/src/init1.c @@ -6181,7 +6181,7 @@ errr init_ab_info_txt(FILE *fp, char *buf) level = atoi(buf + 2); skill = find_skill(sec); - if ((skill == -1)) return (1); + if (skill == -1) return (1); for (z = 0; z < 10; z++) if (ab_ptr->skills[z] == -1) break; @@ -6203,7 +6203,7 @@ errr init_ab_info_txt(FILE *fp, char *buf) ab = find_ability(buf + 2); - if ((ab == -1)) return (1); + if (ab == -1) return (1); for (z = 0; z < 10; z++) if (ab_ptr->need_abilities[z] == -1) break; @@ -6238,7 +6238,7 @@ errr init_ab_info_txt(FILE *fp, char *buf) break; } - if ((stat == 6)) return (1); + if (stat == 6) return (1); ab_ptr->stat[stat] = atoi(buf + 2); diff --git a/src/z-virt.h b/src/z-virt.h index cde14f6c..a7880f2f 100644 --- a/src/z-virt.h +++ b/src/z-virt.h @@ -65,47 +65,47 @@ extern "C" { /* Wipe an array of type T[N], at location P, and return P */ #define C_WIPE(P,N,T) \ - (T*)(memset((char*)(P),0,C_SIZE(N,T))) + (memset((char*)(P),0,C_SIZE(N,T))) /* Wipe a thing of type T, at location P, and return P */ #define WIPE(P,T) \ - (T*)(memset((char*)(P),0,SIZE(T))) + (memset((char*)(P),0,SIZE(T))) /* Load an array of type T[N], at location P1, from another, at location P2 */ #define C_COPY(P1,P2,N,T) \ - (T*)(memcpy((char*)(P1),(char*)(P2),C_SIZE(N,T))) + (memcpy((char*)(P1),(char*)(P2),C_SIZE(N,T))) /* Load a thing of type T, at location P1, from another, at location P2 */ #define COPY(P1,P2,T) \ - (T*)(memcpy((char*)(P1),(char*)(P2),SIZE(T))) + (memcpy((char*)(P1),(char*)(P2),SIZE(T))) /* Free an array of N things of type T at P, return NULL */ #define C_FREE(P,N,T) \ - (T*)(rnfree(P,C_SIZE(N,T))) + (rnfree(P,C_SIZE(N,T))) /* Free one thing of type T at P, return NULL */ #define FREE(P,T) \ - (T*)(rnfree(P,SIZE(T))) + (rnfree(P,SIZE(T))) /* Allocate, and return, an array of type T[N] */ #define C_RNEW(N,T) \ - ((T*)(ralloc(C_SIZE(N,T)))) + (ralloc(C_SIZE(N,T))) /* Allocate, and return, a thing of type T */ #define RNEW(T) \ - ((T*)(ralloc(SIZE(T)))) + (ralloc(SIZE(T))) /* Allocate, wipe, and return an array of type T[N] */ #define C_ZNEW(N,T) \ - ((T*)(C_WIPE(C_RNEW(N,T),N,T))) + (C_WIPE(C_RNEW(N,T),N,T)) /* Allocate, wipe, and return a thing of type T */ #define ZNEW(T) \ - ((T*)(WIPE(RNEW(T),T))) + (WIPE(RNEW(T),T)) /* Allocate a wiped array of type T[N], assign to pointer P */ |