Fix all the simple compiler warnings.
[open-adventure.git] / actions.c
index 1e1e223035cf418f4c4727f8ef6c27495c7af3e5..9a68f268429a0f5ed1c9c615164fc1e325996850 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -129,17 +129,18 @@ static int bigwords(long foo)
        if (game.place[EGGS]==PLAC[EGGS] || (TOTING(EGGS) && game.loc==PLAC[EGGS])) {
            RSPEAK(spk);
            return GO_CLEAROBJ;
+       } else {
+           /*  Bring back troll if we steal the eggs back from him before
+            *  crossing. */
+           if (game.place[EGGS]==0 && game.place[TROLL]==0 && game.prop[TROLL]==0)
+               game.prop[TROLL]=1;
+           k=2;
+           if (HERE(EGGS))k=1;
+           if (game.loc == PLAC[EGGS])k=0;
+           MOVE(EGGS,PLAC[EGGS]);
+           PSPEAK(EGGS,k);
+           return GO_CLEAROBJ;
        }
-       /*  Bring back troll if we steal the eggs back from him before
-        *  crossing. */
-       if (game.place[EGGS]==0 && game.place[TROLL]==0 && game.prop[TROLL]==0)
-           game.prop[TROLL]=1;
-       k=2;
-       if (HERE(EGGS))k=1;
-       if (game.loc == PLAC[EGGS])k=0;
-       MOVE(EGGS,PLAC[EGGS]);
-       PSPEAK(EGGS,k);
-       return GO_CLEAROBJ;
     }
 }
 
@@ -469,7 +470,7 @@ static int feed(token_t verb, token_t obj)
        return GO_CLEAROBJ;
     }
     else if (obj == SNAKE || obj == DRAGON || obj == TROLL) {
-       int spk=102;
+       spk=102;
        if (obj == DRAGON && game.prop[DRAGON] != 0)spk=110;
        if (obj == TROLL)spk=182;
        if (obj == SNAKE && !game.closed && HERE(BIRD)) {
@@ -693,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;
@@ -988,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)