Fix a 64-bit warning. While here, also fix a gcc34 warning.
authorSascha Wildner <swildner@dragonflybsd.org>
Mon, 10 Nov 2008 15:28:13 +0000 (15:28 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Mon, 10 Nov 2008 15:28:13 +0000 (15:28 +0000)
games/hunt/huntd/conf.c
games/hunt/huntd/driver.c

index 1ce9b01..6012117 100644 (file)
@@ -2,7 +2,7 @@
  * David Leonard <d@openbsd.org>, 1999. Public domain.
  *
  * $OpenBSD: conf.c,v 1.7 2007/03/20 03:43:50 tedu Exp $
- * $DragonFly: src/games/hunt/huntd/conf.c,v 1.2 2008/09/04 16:12:51 swildner Exp $
+ * $DragonFly: src/games/hunt/huntd/conf.c,v 1.3 2008/11/10 15:28:13 swildner Exp $
  */
 #include <sys/param.h>
 #include <sys/types.h>
@@ -216,7 +216,7 @@ parse_line(char *buf, const char *fnm, int *line)
        if (kvp->kw == NULL) {
                logx(LOG_ERR, 
                    "%s:%d: unrecognised variable \"%.*s\"", 
-                   fnm, *line, endword - word, word);
+                   fnm, *line, (int)(endword - word), word);
                return;
        }
 
index d8efe66..f21940b 100644 (file)
@@ -30,7 +30,7 @@
  *
  * $OpenBSD: driver.c,v 1.17 2007/04/02 14:55:16 jmc Exp $
  * $NetBSD: driver.c,v 1.5 1997/10/20 00:37:16 lukem Exp $
- * $DragonFly: src/games/hunt/huntd/driver.c,v 1.2 2008/09/04 16:12:51 swildner Exp $
+ * $DragonFly: src/games/hunt/huntd/driver.c,v 1.3 2008/11/10 15:28:13 swildner Exp $
  */
 
 #include <sys/ioctl.h>
@@ -725,7 +725,7 @@ zap(PLAYER *pp, FLAG was_player)
                expl_charge = rand_num(ammo_exploding + 1);
                if (pp->p_ammo == 0)
                        /* Ignore the no-ammo case: */
-                       expl_charge = 0;
+                       expl_charge = expl_type = 0;
                else if (ammo_exploding >= pp->p_ammo - 1) {
                        /* Maximal explosions always appear as slime: */
                        expl_charge = pp->p_ammo;