Some more linter warnings

This commit is contained in:
NHOrus 2017-06-28 20:40:46 +03:00 committed by Eric S. Raymond
parent b729853e7a
commit aca6d79087
4 changed files with 5 additions and 5 deletions

View file

@ -74,7 +74,7 @@ newdb.c newdb.h: newdungeon.py adventure.yaml
python3 newdungeon.py python3 newdungeon.py
linenoise.o: linenoise/linenoise.h linenoise.o: linenoise/linenoise.h
$(CC) -c linenoise/linenoise.c $(CC) $(CCFLAGS) -c linenoise/linenoise.c
dungeon: dungeon.o common.o dungeon: dungeon.o common.o
$(CC) $(CCFLAGS) -o $@ dungeon.o common.o $(CC) $(CCFLAGS) -o $@ dungeon.o common.o

View file

@ -14,7 +14,7 @@ static int attack(FILE *input, struct command_t *command)
{ {
vocab_t verb = command->verb; vocab_t verb = command->verb;
vocab_t obj = command->obj; vocab_t obj = command->obj;
int spk = actions[verb].message; long spk = actions[verb].message;
if (obj == 0 || obj == INTRANSITIVE) { if (obj == 0 || obj == INTRANSITIVE) {
if (atdwrf(game.loc) > 0) if (atdwrf(game.loc) > 0)
obj = DWARF; obj = DWARF;

View file

@ -159,7 +159,7 @@ static long GETNUM(FILE *source)
* scanned). If we're at the end of the line or encounter an illegal * scanned). If we're at the end of the line or encounter an illegal
* character (not a digit, hyphen, or blank), we return 0. */ * character (not a digit, hyphen, or blank), we return 0. */
long DIGIT, GETNUM, sign; long GETNUM, sign;
if (source != NULL) MAPLIN(source); if (source != NULL) MAPLIN(source);
GETNUM = 0; GETNUM = 0;
@ -176,7 +176,7 @@ static long GETNUM(FILE *source)
LNPOSN = LNPOSN + 1; LNPOSN = LNPOSN + 1;
} }
while (!(LNPOSN > LNLENG || INLINE[LNPOSN] == 0)) { while (!(LNPOSN > LNLENG || INLINE[LNPOSN] == 0)) {
DIGIT = INLINE[LNPOSN] - 64; long DIGIT = INLINE[LNPOSN] - 64;
if (DIGIT < 0 || DIGIT > 9) { if (DIGIT < 0 || DIGIT > 9) {
GETNUM = 0; GETNUM = 0;
break; break;

2
misc.c
View file

@ -535,7 +535,7 @@ long atdwrf(long where)
long setbit(long bit) long setbit(long bit)
/* Returns 2**bit for use in constructing bit-masks. */ /* Returns 2**bit for use in constructing bit-masks. */
{ {
return (1 << bit); return (1L << bit);
} }
bool tstbit(long mask, int bit) bool tstbit(long mask, int bit)