From 17697c3a4116f615a72085c20c62f255553a012e Mon Sep 17 00:00:00 2001 From: fair Date: Thu, 23 Oct 1997 07:05:55 +0000 Subject: 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?) --- hack/hack.invent.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'hack/hack.invent.c') 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 #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 @@ -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; -- cgit v1.2.3-56-ge451