Subject: port-alpha/3690: If DIAGNOSTIC isn't configured, build fails.
To: None <gnats-bugs@gnats.netbsd.org>
From: Ted Lemon <mellon@ab.home.vix.com>
List: netbsd-bugs
Date: 05/30/1997 16:46:39
>Number:         3690
>Category:       port-alpha
>Synopsis:       If DIAGNOSTIC isn't configured, build fails.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri May 30 16:50:00 1997
>Last-Modified:
>Originator:     Ted Lemon
>Organization:
Ted Lemon							 mellon@vix.com
+1 415 567 7999
>Release:        May 27, 1997
>Environment:
	
System: NetBSD ab.home.vix.com 1.2E NetBSD 1.2E (AB) #1: Tue May 27 18:14:41 PDT 1997 mellon@ab.home.vix.com:/usr/src/sys/arch/alpha/compile/AB alpha


>Description:
	sys/arch/alpha/pci/apecs_pci.c doesn't compile if DIAGNOSTIC isn't
	defined because gcc warns that some variables may be used without
	being initialized.   The warning is incorrect, but there's no way
	to make gcc not make the error other than by disabling the warning.
	Because a kernel should build without -DDIAGNOSTIC, I think that
	by default the Makefile needs to disable uninitialized warnings.   :'(
>How-To-Repeat:
	Build an Alpha kernel with pci support without DIAGNOSTIC defined.
>Fix:

Index: Makefile.alpha
===================================================================
RCS file: /cvsroot/src/sys/arch/alpha/conf/Makefile.alpha,v
retrieving revision 1.33
diff -c -2 -r1.33 Makefile.alpha
*** Makefile.alpha	1997/04/06 23:03:09	1.33
--- Makefile.alpha	1997/05/30 23:44:13
***************
*** 38,42 ****
  		-Dalpha
  CWARNFLAGS?=	-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
! 		-Wno-format
  CFLAGS=		${DEBUG} ${COPTS} ${CWARNFLAGS} -mno-fp-regs
  AFLAGS=		-traditional -D_LOCORE
--- 38,42 ----
  		-Dalpha
  CWARNFLAGS?=	-Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
! 		-Wno-format -Wno-uninitialized
  CFLAGS=		${DEBUG} ${COPTS} ${CWARNFLAGS} -mno-fp-regs
  AFLAGS=		-traditional -D_LOCORE
>Audit-Trail:
>Unformatted: