NetBSD Problem Report #31942

From hauke@Espresso.Rhein-Neckar.DE  Fri Oct 28 21:29:32 2005
Return-Path: <hauke@Espresso.Rhein-Neckar.DE>
Received: from la3serv.rninet.de (la3serv.rninet.de [62.225.55.3])
	by narn.netbsd.org (Postfix) with ESMTP id 4A79663B8C2
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 28 Oct 2005 21:29:30 +0000 (UTC)
Message-Id: <200510282106.j9SL6NMK001242@mara.causeuse.org>
Date: Fri, 28 Oct 2005 23:06:27 +0200 (CEST)
From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Reply-To: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@netbsd.org
Cc: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
Subject: -current DEBUG kernel build fails because of gcc whining 
X-Send-Pr-Version: 3.95

>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:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 28 21:30:00 +0000 2005
>Closed-Date:    Sat Nov 05 20:03:41 +0000 2005
>Last-Modified:  Sat Nov 05 20:03:41 +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.

>How-To-Repeat:

>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;


>Release-Note:

>Audit-Trail:
From: Christos Zoulas <christos@netbsd.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: PR/31942 CVS commit: src/sys/arch/mac68k/dev
Date: Fri, 28 Oct 2005 21:54:52 +0000 (UTC)

 Module Name:	src
 Committed By:	christos
 Date:		Fri Oct 28 21:54:52 UTC 2005

 Modified Files:
 	src/sys/arch/mac68k/dev: pm_direct.c

 Log Message:
 PR/31942: Hauke Fath: -current DEBUG kernel build fails because of gcc whining


 To generate a diff of this commit:
 cvs rdiff -r1.24 -r1.25 src/sys/arch/mac68k/dev/pm_direct.c

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

From: Hauke Fath <hauke@Espresso.Rhein-Neckar.DE>
To: gnats-bugs@NetBSD.org
Cc: port-mac68k-maintainer@NetBSD.org, gnats-admin@NetBSD.org,
	netbsd-bugs@NetBSD.org
Subject: Re: PR/31942 CVS commit: src/sys/arch/mac68k/dev
Date: Sat, 29 Oct 2005 16:38:35 +0200

 At 21:55 Uhr +0000 28.10.2005, Christos Zoulas wrote:
 >The following reply was made to PR port-mac68k/31942; it has been noted by
 >GNATS.

 Thanks, Christos, but you were too fast for my little Quadra 700.  ;)

 Here is some more DEBUG fallout:

 <snip>
 Index: trap.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/mac68k/mac68k/trap.c,v
 retrieving revision 1.114
 diff -u -u -r1.114 trap.c
 --- trap.c	3 Jun 2005 11:15:44 -0000	1.114
 +++ trap.c	29 Oct 2005 13:51:09 -0000
 @@ -703,9 +703,9 @@
  	int wbsize[4];
  } wbstats;

 -char *f7sz[] = { "longword", "byte", "word", "line" };
 -char *f7tt[] = { "normal", "MOVE16", "AFC", "ACK" };
 -char *f7tm[] = { "d-push", "u-data", "u-code", "M-data",
 +const char *f7sz[] = { "longword", "byte", "word", "line" };
 +const char *f7tt[] = { "normal", "MOVE16", "AFC", "ACK" };
 +const char *f7tm[] = { "d-push", "u-data", "u-code", "M-data",
  		 "M-code", "k-data", "k-code", "RES" };
  char wberrstr[] =
      "WARNING: pid %d(%s) writeback [%s] failed, pc=%x fa=%x wba=%x wbd=%x\n";
 Index: pram.c
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/mac68k/mac68k/pram.c,v
 retrieving revision 1.19
 diff -u -u -r1.19 pram.c
 --- pram.c	15 Jul 2003 02:43:22 -0000	1.19
 +++ pram.c	29 Oct 2005 13:51:10 -0000
 @@ -52,11 +52,11 @@
  #endif

  #if DEBUG
 -static char *convtime(unsigned long t)
 +static const char *convtime(unsigned long t)
  {
    static long daypmon[] = { 31,28,31,30,31,30,31,31,30,31,30,31 };
 -  static char *monstr[] = {"January","February","March","April","May","June",
 -    "July","August","September","October","November","December" };
 +  static const char *monstr[] = {"January","February","March","April","May",
 +    "June","July","August","September","October","November","December" };
    static char s[200];
    long year,month,day,hour,minute,seconds,i,dayperyear;

 </snip>

 	hauke

 --
 "It's never straight up and down"     (DEVO)


State-Changed-From-To: open->closed
State-Changed-By: chs@netbsd.org
State-Changed-When: Sat, 05 Nov 2005 20:03:41 +0000
State-Changed-Why:
fixed by christos


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.