Subject: port-mac68k/31942: -current DEBUG kernel build fails because of gcc whining
To: None <port-mac68k-maintainer@netbsd.org, gnats-admin@netbsd.org,>
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
List: netbsd-bugs
Date: 10/28/2005 21:30:01
>Number:         31942
>Category:       port-mac68k
>Synopsis:       -current DEBUG kernel build fails because of gcc whining
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-mac68k-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 28 21:30:00 +0000 2005
>Originator:     Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
>Release:        NetBSD 3.99.10
>Organization:
Mahlzeit!
>Environment:
	
	
System: NetBSD mara 3.99.10 NetBSD 3.99.10 (GENERICSBC) #0: Tue Oct 25 23:44:06 CEST 2005 hf@heiligenberg:/var/obj/netbsd-builds/current/mac68k/sys/arch/mac68k/compile/GENERICSBC mac68k
Architecture: m68k
Machine: mac68k
>Description:

	Build a GENERIC mac68k kernel from -current sources with DEBUG 
	and DIAGNOSTIC options. The build fails because of gcc whining.

[hauke@mara] /<5>compile/TESTER > make USETOOLS=no
making sure the 68040 FPSP is up to date...
`fpsp.o' is up to date.
#   compile  TESTER/vfs_lockf.o
cc -msoft-float -ffreestanding -g -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -W
strict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss 
-Dmac68k -I. -I../../../../arch -I../../../.. -nostdinc -DM68040 -DM68030 -DM68020 -DLKM -DDIAGNOSTIC -DDEBUG -DGRF_COMPAT -D
MAXUSERS=16 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../kern/vfs_lockf.c
#   compile  TESTER/pm_direct.o
cc -msoft-float -ffreestanding -g -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -W
strict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss 
-Dmac68k -I. -I../../../../arch -I../../../.. -nostdinc -DM68040 -DM68030 -DM68020 -DLKM -DDIAGNOSTIC -DDEBUG -DGRF_COMPAT -D
MAXUSERS=16 -D_KERNEL -D_KERNEL_OPT -I../../../../dist/ipf -c ../../../../arch/mac68k/dev/pm_direct.c
../../../../arch/mac68k/dev/pm_direct.c: In function `pm_intr_pm1':
../../../../arch/mac68k/dev/pm_direct.c:583: warning: passing arg 1 of `pm_printerr' discards qualifiers from pointer target type
../../../../arch/mac68k/dev/pm_direct.c: In function `pm_intr_pm2':
../../../../arch/mac68k/dev/pm_direct.c:875: warning: passing arg 1 of `pm_printerr' discards qualifiers from pointer target type
*** Error code 1

Stop.

>Fix:

Apply the patch

Index: pm_direct.c
===================================================================
RCS file: /cvsroot/src/sys/arch/mac68k/dev/pm_direct.c,v
retrieving revision 1.24
diff -u -u -r1.24 pm_direct.c
--- pm_direct.c 16 Jun 2005 22:45:46 -0000      1.24
+++ pm_direct.c 28 Oct 2005 20:52:30 -0000
@@ -166,7 +166,7 @@
 
 /* for debugging */
 #ifdef ADB_DEBUG
-void   pm_printerr(char *, int, int, char *);
+void   pm_printerr(const char *, int, int, char *);
 #endif
 
 int    pm_wait_busy(int);
@@ -229,7 +229,7 @@
  * This function dumps contents of the PMData
  */
 void
-pm_printerr(char *ttl, int rval, int num, char *data)
+pm_printerr(const char *ttl, int rval, int num, char *data)
 {
        int i;
 

>Unformatted: