Fix some potential problems detected by clang.

Most of these are unnecessary comparisons and functions returning the
wrong types.
This commit is contained in:
John "Elwin" Edwards 2017-09-23 09:47:00 -04:00
parent 614dcfffd2
commit 172c83f254
11 changed files with 24 additions and 25 deletions

View file

@ -65,7 +65,7 @@ char *ws_guess[MAXSTICKS]; /* Players guess at what wand is */
char *ws_type[MAXSTICKS]; /* Is it a wand or a staff */
char file_name[256]; /* Save file name */
char home[PATH_MAX]; /* User's home directory */
unsigned char prbuf[80]; /* Buffer for sprintfs */
char prbuf[80]; /* Buffer for sprintfs */
int max_hp; /* Player's max hit points */
int ntraps; /* Number of traps on this level */
int max_level; /* Deepest player has gone */

View file

@ -469,7 +469,7 @@ extern int p_know[MAXPOTIONS]; /* Does he know what a potion d
extern struct magic_item p_magic[MAXPOTIONS]; /* Names and chances for potions */
extern struct thing player; /* The rogue */
extern int playing; /* True until he quits */
extern unsigned char prbuf[80]; /* Buffer for sprintfs */
extern char prbuf[80]; /* Buffer for sprintfs */
extern int purse; /* How much gold the rogue has */
extern int quiet; /* Number of quiet turns */
extern char * r_guess[MAXRINGS]; /* Players guess at what ring is */