summaryrefslogtreecommitdiffstats
path: root/hack/hack.invent.c
diff options
context:
space:
mode:
authorfair <fair@NetBSD.org>1997-10-23 07:05:55 +0000
committerfair <fair@NetBSD.org>1997-10-23 07:05:55 +0000
commit17697c3a4116f615a72085c20c62f255553a012e (patch)
treef29aa4111296743fa68abda3bcab270825a31a28 /hack/hack.invent.c
parente14decaa37fd1aecf3e20ecd2e3f6e3795001ae5 (diff)
downloadbsdgames-darwin-17697c3a4116f615a72085c20c62f255553a012e.tar.gz
bsdgames-darwin-17697c3a4116f615a72085c20c62f255553a012e.tar.zst
bsdgames-darwin-17697c3a4116f615a72085c20c62f255553a012e.zip
Initialize pointers to NULL to avoid gcc/sparc compiler error
hack.invent.c: In function `dolook': hack.invent.c:800: warning: `otmp0' might be used uninitialized in this function hack.invent.c:801: warning: `gold' might be used uninitialized in this function (this is awfully tiresome - can't we fix gcc?)
Diffstat (limited to 'hack/hack.invent.c')
-rw-r--r--hack/hack.invent.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hack/hack.invent.c b/hack/hack.invent.c
index 2c8b94cf..9cd1bb92 100644
--- a/hack/hack.invent.c
+++ b/hack/hack.invent.c
@@ -1,4 +1,4 @@
-/* $NetBSD: hack.invent.c,v 1.5 1997/10/19 16:58:05 christos Exp $ */
+/* $NetBSD: hack.invent.c,v 1.6 1997/10/23 07:05:55 fair Exp $ */
/*
* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985.
@@ -6,7 +6,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: hack.invent.c,v 1.5 1997/10/19 16:58:05 christos Exp $");
+__RCSID("$NetBSD: hack.invent.c,v 1.6 1997/10/23 07:05:55 fair Exp $");
#endif /* not lint */
#include <stdlib.h>
@@ -797,8 +797,8 @@ dotypeinv()
int
dolook()
{
- struct obj *otmp, *otmp0;
- struct gold *gold;
+ struct obj *otmp = NULL, *otmp0 = NULL;
+ struct gold *gold = NULL;
char *verb = Blind ? "feel" : "see";
int ct = 0;