Subject: kern/29669: kernel compile error (GCC warnings) in pf(4)
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <fun@naobsd.org>
List: netbsd-bugs
Date: 03/12/2005 06:06:00
>Number:         29669
>Category:       kern
>Synopsis:       kernel compile error (GCC warnings) in pf(4)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Mar 12 06:06:00 +0000 2005
>Originator:     FUKAUMI Naoki
>Release:        NetBSD 2.99.16
>Organization:
	FUKAUMI Naoki
>Environment:
System: NetBSD tr1.naobsd.org 2.99.16 NetBSD 2.99.16 (TR1) #1: Sun Feb 27 23:58:30 JST 2005 fun@tr1.naobsd.org:/home/fun/src/sys/arch/i386/compile/TR1 i386
Architecture: i386
Machine: i386
>Description:
	pf_ioctl.c can't compile because GCC warns about uninitialized
	variable.
>How-To-Repeat:
	Compile custom kernel for OpenBlockS266 (evbppc) with pf(4).
>Fix:
Index: sys/dist/pf/net/pf_ioctl.c
===================================================================
RCS file: /home/fun/cvsroot/NetBSD/src/sys/dist/pf/net/pf_ioctl.c,v
retrieving revision 1.15
diff -u -r1.15 pf_ioctl.c
--- sys/dist/pf/net/pf_ioctl.c	14 Feb 2005 21:28:33 -0000	1.15
+++ sys/dist/pf/net/pf_ioctl.c	9 Mar 2005 02:55:40 -0000
@@ -452,7 +452,7 @@
 pf_find_or_create_ruleset(const char *path)
 {
 	static char		 p[MAXPATHLEN];
-	char			*q, *r;
+	char			*q = NULL /* XXX gcc */, *r;
 	struct pf_ruleset	*ruleset;
 	struct pf_anchor	*anchor = NULL /* XXX gcc */,
 				*dup, *parent = NULL;