Pacify some clang compile warnings

This commit is contained in:
Pasi Kallinen
2015-11-21 23:40:06 +02:00
parent 90302ce86d
commit 7063488621
7 changed files with 56 additions and 45 deletions
+3
View File
@@ -797,6 +797,9 @@ E boolean FDECL(bad_rock, (struct permonst *, XCHAR_P, XCHAR_P));
E int FDECL(cant_squeeze_thru, (struct monst *)); E int FDECL(cant_squeeze_thru, (struct monst *));
E boolean FDECL(invocation_pos, (XCHAR_P, XCHAR_P)); E boolean FDECL(invocation_pos, (XCHAR_P, XCHAR_P));
E boolean FDECL(test_move, (int, int, int, int, int)); E boolean FDECL(test_move, (int, int, int, int, int));
#ifdef DEBUG
E int NDECL(wiz_debug_cmd_traveldisplay);
#endif
E boolean NDECL(u_rooted); E boolean NDECL(u_rooted);
E void NDECL(domove); E void NDECL(domove);
E boolean NDECL(overexertion); E boolean NDECL(overexertion);
+1
View File
@@ -52,6 +52,7 @@ STATIC_DCL void FDECL(savelife, (int));
STATIC_DCL void FDECL(list_vanquished, (CHAR_P, BOOLEAN_P)); STATIC_DCL void FDECL(list_vanquished, (CHAR_P, BOOLEAN_P));
STATIC_DCL void FDECL(list_genocided, (CHAR_P, BOOLEAN_P)); STATIC_DCL void FDECL(list_genocided, (CHAR_P, BOOLEAN_P));
STATIC_DCL boolean FDECL(should_query_disclose_option, (int, char *)); STATIC_DCL boolean FDECL(should_query_disclose_option, (int, char *));
STATIC_DCL int NDECL(num_extinct);
#if defined(__BEOS__) || defined(MICRO) || defined(WIN32) || defined(OS2) #if defined(__BEOS__) || defined(MICRO) || defined(WIN32) || defined(OS2)
extern void FDECL(nethack_exit, (int)); extern void FDECL(nethack_exit, (int));
+5 -4
View File
@@ -843,8 +843,8 @@ int mode;
#ifdef DEBUG #ifdef DEBUG
static boolean trav_debug = FALSE; static boolean trav_debug = FALSE;
int wiz_debug_cmd_traveldisplay() /* in this case, toggle display of travel /* in this case, toggle display of travel debug info */
debug info */ int wiz_debug_cmd_traveldisplay()
{ {
trav_debug = !trav_debug; trav_debug = !trav_debug;
return 0; return 0;
@@ -1207,8 +1207,9 @@ domove()
struct trap *trap = NULL; struct trap *trap = NULL;
int wtcap; int wtcap;
boolean on_ice; boolean on_ice;
xchar chainx, chainy, ballx, bally; /* ball&chain new positions */ xchar chainx = 0, chainy = 0,
int bc_control; /* control for ball&chain */ ballx = 0, bally = 0; /* ball&chain new positions */
int bc_control = 0; /* control for ball&chain */
boolean cause_delay = FALSE; /* dragging ball will skip a move */ boolean cause_delay = FALSE; /* dragging ball will skip a move */
u_wipe_engr(rnd(5)); u_wipe_engr(rnd(5));
+1 -1
View File
@@ -9,7 +9,7 @@
#include "color.h" #include "color.h"
#define HI_DOMESTIC CLR_WHITE /* monst.c */ #define HI_DOMESTIC CLR_WHITE /* monst.c */
int explcolors[] = { static int explcolors[] = {
CLR_BLACK, /* dark */ CLR_BLACK, /* dark */
CLR_GREEN, /* noxious */ CLR_GREEN, /* noxious */
CLR_BROWN, /* muddy */ CLR_BROWN, /* muddy */
+37 -37
View File
@@ -23,46 +23,46 @@ struct icp {
char iclass; /* item class */ char iclass; /* item class */
}; };
const struct icp mkobjprobs[] = { { 10, WEAPON_CLASS }, static const struct icp mkobjprobs[] = { { 10, WEAPON_CLASS },
{ 10, ARMOR_CLASS }, { 10, ARMOR_CLASS },
{ 20, FOOD_CLASS }, { 20, FOOD_CLASS },
{ 8, TOOL_CLASS }, { 8, TOOL_CLASS },
{ 8, GEM_CLASS }, { 8, GEM_CLASS },
{ 16, POTION_CLASS }, { 16, POTION_CLASS },
{ 16, SCROLL_CLASS }, { 16, SCROLL_CLASS },
{ 4, SPBOOK_CLASS }, { 4, SPBOOK_CLASS },
{ 4, WAND_CLASS }, { 4, WAND_CLASS },
{ 3, RING_CLASS }, { 3, RING_CLASS },
{ 1, AMULET_CLASS } }; { 1, AMULET_CLASS } };
const struct icp boxiprobs[] = { { 18, GEM_CLASS }, static const struct icp boxiprobs[] = { { 18, GEM_CLASS },
{ 15, FOOD_CLASS }, { 15, FOOD_CLASS },
{ 18, POTION_CLASS }, { 18, POTION_CLASS },
{ 18, SCROLL_CLASS }, { 18, SCROLL_CLASS },
{ 12, SPBOOK_CLASS }, { 12, SPBOOK_CLASS },
{ 7, COIN_CLASS }, { 7, COIN_CLASS },
{ 6, WAND_CLASS }, { 6, WAND_CLASS },
{ 5, RING_CLASS }, { 5, RING_CLASS },
{ 1, AMULET_CLASS } }; { 1, AMULET_CLASS } };
const struct icp rogueprobs[] = { { 12, WEAPON_CLASS }, static const struct icp rogueprobs[] = { { 12, WEAPON_CLASS },
{ 12, ARMOR_CLASS }, { 12, ARMOR_CLASS },
{ 22, FOOD_CLASS }, { 22, FOOD_CLASS },
{ 22, POTION_CLASS }, { 22, POTION_CLASS },
{ 22, SCROLL_CLASS }, { 22, SCROLL_CLASS },
{ 5, WAND_CLASS }, { 5, WAND_CLASS },
{ 5, RING_CLASS } }; { 5, RING_CLASS } };
const struct icp hellprobs[] = { { 20, WEAPON_CLASS }, static const struct icp hellprobs[] = { { 20, WEAPON_CLASS },
{ 20, ARMOR_CLASS }, { 20, ARMOR_CLASS },
{ 16, FOOD_CLASS }, { 16, FOOD_CLASS },
{ 12, TOOL_CLASS }, { 12, TOOL_CLASS },
{ 10, GEM_CLASS }, { 10, GEM_CLASS },
{ 1, POTION_CLASS }, { 1, POTION_CLASS },
{ 1, SCROLL_CLASS }, { 1, SCROLL_CLASS },
{ 8, WAND_CLASS }, { 8, WAND_CLASS },
{ 8, RING_CLASS }, { 8, RING_CLASS },
{ 4, AMULET_CLASS } }; { 4, AMULET_CLASS } };
struct oextra * struct oextra *
newoextra() newoextra()
+3 -2
View File
@@ -13,6 +13,7 @@
STATIC_VAR boolean vamp_rise_msg; STATIC_VAR boolean vamp_rise_msg;
STATIC_DCL void FDECL(sanity_check_single_mon, (struct monst *, const char *));
STATIC_DCL boolean FDECL(restrap, (struct monst *)); STATIC_DCL boolean FDECL(restrap, (struct monst *));
STATIC_DCL long FDECL(mm_aggression, (struct monst *, struct monst *)); STATIC_DCL long FDECL(mm_aggression, (struct monst *, struct monst *));
STATIC_DCL long FDECL(mm_displacement, (struct monst *, struct monst *)); STATIC_DCL long FDECL(mm_displacement, (struct monst *, struct monst *));
@@ -2725,8 +2726,8 @@ struct monst *mon;
} }
} }
short *animal_list = 0; /* list of PM values for animal monsters */ static short *animal_list = 0; /* list of PM values for animal monsters */
int animal_list_count; static int animal_list_count;
void void
mon_animal_list(construct) mon_animal_list(construct)
+6 -1
View File
@@ -512,9 +512,14 @@ STATIC_DCL const char *FDECL(attr2attrname, (int));
STATIC_DCL int NDECL(query_color); STATIC_DCL int NDECL(query_color);
STATIC_DCL int NDECL(query_msgtype); STATIC_DCL int NDECL(query_msgtype);
STATIC_DCL int FDECL(query_attr, (const char *)); STATIC_DCL int FDECL(query_attr, (const char *));
STATIC_DCL const char * FDECL(msgtype2name, (int));
STATIC_DCL boolean FDECL(msgtype_add, (int, char *));
STATIC_DCL void FDECL(free_one_msgtype, (int));
STATIC_DCL int NDECL(msgtype_count);
STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int)); STATIC_DCL boolean FDECL(add_menu_coloring_parsed, (char *, int, int));
STATIC_DCL void FDECL(free_one_menu_coloring, (int)); STATIC_DCL void FDECL(free_one_menu_coloring, (int));
STATIC_DCL int NDECL(count_menucolors); STATIC_DCL int NDECL(count_menucolors);
STATIC_DCL int FDECL(handle_add_list_remove, (char *, int));
void void
reglyph_darkroom() reglyph_darkroom()
@@ -3492,7 +3497,7 @@ int
doset() doset()
{ {
char buf[BUFSZ], buf2[BUFSZ]; char buf[BUFSZ], buf2[BUFSZ];
int i, pass, boolcount, pick_cnt, pick_idx, opt_indx; int i = 0, pass, boolcount, pick_cnt, pick_idx, opt_indx;
boolean *bool_p; boolean *bool_p;
winid tmpwin; winid tmpwin;
anything any; anything any;