Additional warnings

One of the two is fixed and GCC-exclusive, will cause more
warnings on Clang
This commit is contained in:
NHOrus 2018-03-08 15:20:14 +03:00
parent 2787cb1413
commit 5cdaa301dc
2 changed files with 12 additions and 8 deletions

View file

@ -105,6 +105,8 @@ linty: CCFLAGS += -Wstrict-prototypes
linty: CCFLAGS += -Wmissing-prototypes linty: CCFLAGS += -Wmissing-prototypes
linty: CCFLAGS += -Wmissing-declarations linty: CCFLAGS += -Wmissing-declarations
linty: CCFLAGS += -Wshadow linty: CCFLAGS += -Wshadow
linty: CCFLAGS += -Wnull-dereference
linty: CCFLAGS += -Wjump-misses-init
linty: CCFLAGS += -Wfloat-equal linty: CCFLAGS += -Wfloat-equal
linty: CCFLAGS += -Wcast-align linty: CCFLAGS += -Wcast-align
linty: CCFLAGS += -Wwrite-strings linty: CCFLAGS += -Wwrite-strings

18
main.c
View file

@ -694,14 +694,16 @@ static void playermove( int motion)
* to get it out. Having dropped it, go back and * to get it out. Having dropped it, go back and
* pretend he wasn't carrying it after all. */ * pretend he wasn't carrying it after all. */
drop(EMERALD, game.loc); drop(EMERALD, game.loc);
int te_tmp = travel_entry; {
do { int te_tmp = travel_entry;
if (travel[te_tmp].stop) do {
BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE if (travel[te_tmp].stop)
++te_tmp; BUG(CONDITIONAL_TRAVEL_ENTRY_WITH_NO_ALTERATION); // LCOV_EXCL_LINE
} while ++te_tmp;
(traveleq(travel_entry, te_tmp)); } while
travel_entry = te_tmp; (traveleq(travel_entry, te_tmp));
travel_entry = te_tmp;
}
continue; /* goto L12 */ continue; /* goto L12 */
case 3: case 3:
/* Special travel 3. Troll bridge. Must be done /* Special travel 3. Troll bridge. Must be done