From: Jason S. Ninneman Date: Tue, 13 Jun 2017 18:15:43 +0000 (-0700) Subject: Fix all the simple compiler warnings. X-Git-Tag: 1.1~340 X-Git-Url: https://jxself.org/git/?a=commitdiff_plain;h=bfa06be62d73a8ed7559b5344672d8a3f9bd947e;p=open-adventure.git Fix all the simple compiler warnings. --- diff --git a/actions.c b/actions.c index c256689..9a68f26 100644 --- a/actions.c +++ b/actions.c @@ -694,7 +694,6 @@ static int listen(void) static int lock(token_t verb, token_t obj) /* Lock, unlock, no object given. Assume various things if present. */ { - int k; int spk = ACTSPK[verb]; if (obj == INTRANSITIVE) { spk=28; @@ -989,7 +988,6 @@ int action(FILE *input, enum speechpart part, long verb, token_t obj) * unless verb is "say", which snarfs arbitrary second word. */ { - int kk; token_t spk=ACTSPK[verb]; if (part == unknown) diff --git a/dungeon.c b/dungeon.c index 4279dc9..1f56f84 100644 --- a/dungeon.c +++ b/dungeon.c @@ -29,7 +29,6 @@ static long LNLENG; static long LNPOSN; static char INLINE[LINESIZE+1]; static long OLDLOC; -static long MAXDIE; // Storage for what comes out of the database long LINUSE; diff --git a/main.c b/main.c index 10fce65..b5d190d 100644 --- a/main.c +++ b/main.c @@ -904,7 +904,7 @@ static void listobjects(void) static bool do_command(FILE *cmdin) /* Get and execute a command */ { - long KQ, VERB, KK, V1, V2; + long KQ, VERB, V1, V2; long i, k, KMOD; static long igo = 0; static long obj = 0; diff --git a/misc.c b/misc.c index 075e9d0..c47ce1d 100644 --- a/misc.c +++ b/misc.c @@ -27,7 +27,7 @@ void packed_to_token(long packed, char token[6]) for (int i = 0; i < 5; ++i) { char advent = (packed >> i * 6) & 63; - token[4 - i] = advent_to_ascii[advent]; + token[4 - i] = advent_to_ascii[(int) advent]; } // Ensure the last character is \0. @@ -648,7 +648,7 @@ void TYPE(void) } for (i=1; i<=LNLENG; i++) { - INLINE[i]=advent_to_ascii[INLINE[i]]; + INLINE[i]=advent_to_ascii[(int) INLINE[i]]; } INLINE[LNLENG+1]=0; printf("%s\n", INLINE+1); diff --git a/newdb.c b/newdb.c index 4276618..0661543 100644 --- a/newdb.c +++ b/newdb.c @@ -526,13 +526,11 @@ object_description_s object_descriptions[] = { }, { .inventory = "Water in the bottle", - .longs = (char* []) { - }, + .longs = NULL, }, { .inventory = "Oil in the bottle", - .longs = (char* []) { - }, + .longs = NULL, }, { .inventory = "*mirror",