NetBSD Problem Report #29334

From yamt@mwd.biglobe.ne.jp  Fri Feb 11 13:45:25 2005
Return-Path: <yamt@mwd.biglobe.ne.jp>
Received: from yamt.dyndns.org (FLA1Aaf058.kng.mesh.ad.jp [61.193.99.58])
	by narn.netbsd.org (Postfix) with ESMTP id 2731A63B400
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 11 Feb 2005 13:45:25 +0000 (UTC)
Message-Id: <1108129514.408443.5450.nullmailer@yamt.dyndns.org>
Date: Fri, 11 Feb 2005 22:45:14 +0900
From: yamt@mwd.biglobe.ne.jp
Reply-To: yamt@mwd.biglobe.ne.jp
To: gnats-bugs@netbsd.org
Subject: "uninitialized variable" when building evbsh3 kernel
X-Send-Pr-Version: 3.95

>Number:         29334
>Category:       port-evbsh3
>Synopsis:       "uninitialized variable" when building evbsh3 kernel
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-evbsh3-maintainer
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 11 13:46:00 +0000 2005
>Closed-Date:    Sat Mar 19 14:26:45 +0000 2005
>Last-Modified:  Sat Mar 19 18:21:01 +0000 2005
>Originator:     YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
>Release:        today's source
>Organization:

>Environment:


System: NetBSD kaeru 2.99.14 NetBSD 2.99.14 (build.kaeru) #190: Thu Feb 10 18:54:51 JST 2005 takashi@kaeru:/home/takashi/work/kernel/build.kaeru i386
Architecture: i386
Machine: i386
>Description:
	i got the following when cross-building from i386.

/exports/nbsd/src/sys/arch/evbsh3/evbsh3/machdep.c: In function `intc_intr':
/exports/nbsd/src/sys/arch/evbsh3/evbsh3/machdep.c:741: warning: `evtcode' might be used uninitialized in this function
*** [machdep.o] Error code 1
1 error

nbmake: stopped in /exports/abhome/build/evbsh3/COMPUTEXEVB

>How-To-Repeat:
	see above.
>Fix:

Index: machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbsh3/evbsh3/machdep.c,v
retrieving revision 1.51
diff -u -p -r1.51 machdep.c
--- machdep.c	24 Mar 2004 15:34:48 -0000	1.51
+++ machdep.c	11 Feb 2005 13:41:23 -0000
@@ -738,7 +738,7 @@ intc_intr(int ssr, int spc, int ssp)
 {
 	struct intc_intrhand *ih;
 	struct clockframe cf;
-	int s, evtcode;
+	int s, evtcode = 0; /* XXX: gcc */

 	switch (cpu_product) {
 	case CPU_PRODUCT_7708:
@@ -754,6 +754,8 @@ intc_intr(int ssr, int spc, int ssp)
 	case CPU_PRODUCT_7750S:
 		evtcode = _reg_read_4(SH4_INTEVT);
 		break;
+	default:
+		panic("intc_intr: unknown cpu_product %d", cpu_product);
 	}

 	ih = EVTCODE_IH(evtcode);

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: yamt@netbsd.org
State-Changed-When: Sat, 19 Mar 2005 14:26:45 +0000
State-Changed-Why:
fixed by machdep.c rev.1.52.


From: YAMAMOTO Takashi <yamt@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/29334 CVS commit: src/doc
Date: Sat, 19 Mar 2005 18:20:25 +0000 (UTC)

 Module Name:	src
 Committed By:	yamt
 Date:		Sat Mar 19 18:20:25 UTC 2005

 Modified Files:
 	src/doc: BRANCHES

 Log Message:
 PR/29334 was fixed.


 To generate a diff of this commit:
 cvs rdiff -r1.37 -r1.38 src/doc/BRANCHES

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.