From smp@ilsa.systemsix.com  Sat Feb  3 12:54:42 1996
Received: from ilsa.systemsix.com (ilsa.systemsix.com [198.99.86.129])
          by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id MAA28864
          for <FreeBSD-gnats-submit@freebsd.org>; Sat, 3 Feb 1996 12:54:32 -0800 (PST)
Received: (from smp@localhost) by ilsa.systemsix.com (8.6.12/8.6.12) id NAA27872; Sat, 3 Feb 1996 13:54:17 -0700
Message-Id: <199602032054.NAA27872@ilsa.systemsix.com>
Date: Sat, 3 Feb 1996 13:54:17 -0700
From: smp@csn.net
Reply-To: smp@csn.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: noise from g++ & cpufunc.h
X-Send-Pr-Version: 3.2

>Number:         993
>Category:       bin
>Synopsis:       g++ complains about /usr/include/machine/cpufunc.h
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Feb  3 13:00:02 PST 1996
>Closed-Date:    Mon Apr 13 01:42:56 PDT 1998
>Last-Modified:  Mon Apr 13 01:43:15 PDT 1998
>Originator:     Steve Passe
>Release:        FreeBSD 2.1-STABLE i386
>Organization:
New Ideas
>Environment:

	g++

>Description:

	cpufunc.h has 2 lines that generate 'noise' on every compile:

/usr/include/machine/cpufunc.h: In function `void insque(void *, void *)':
In file included from ds1820.c:23:
/usr/include/machine/cpufunc.h:310: warning: ANSI C++ forbids implicit conversion from `void *' in initialization
/usr/include/machine/cpufunc.h:310: warning: ANSI C++ forbids implicit conversion from `void *' in initialization
/usr/include/machine/cpufunc.h: In function `void remque(void *)':
/usr/include/machine/cpufunc.h:321: warning: ANSI C++ forbids implicit conversion from `void *' in initialization

>How-To-Repeat:

	compile a program with g++ that includes
	/usr/include/machine/cpufunc.h

>Fix:
	
	apply the following patch to /usr/include/machine/cpufunc.h:

*** cpufunc.h.orig	Sat Feb  3 13:45:14 1996
--- cpufunc.h	Sat Feb  3 13:48:33 1996
***************
*** 307,313 ****
  static __inline void
  insque(void *a, void *b)
  {
! 	struct quehead *element = a, *head = b;
  
  	element->qh_link = head->qh_link;
  	element->qh_rlink = head;
--- 307,314 ----
  static __inline void
  insque(void *a, void *b)
  {
! 	struct quehead *element =
! 	  (struct quehead*)a, *head = (struct quehead*)b;
  
  	element->qh_link = head->qh_link;
  	element->qh_rlink = head;
***************
*** 318,324 ****
  static __inline void
  remque(void *a)
  {
! 	struct quehead *element = a;
  
  	element->qh_link->qh_rlink = element->qh_rlink;
  	element->qh_rlink->qh_link = element->qh_link;
--- 319,325 ----
  static __inline void
  remque(void *a)
  {
! 	struct quehead *element = (struct quehead *)a;
  
  	element->qh_link->qh_rlink = element->qh_rlink;
  	element->qh_rlink->qh_link = element->qh_link;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: wosch 
State-Changed-When: Tue Sep 24 17:14:26 PDT 1996 
State-Changed-Why:  
We are now update to gcc 2.7.2  


Responsible-Changed-From-To: freebsd-bugs->peter 
Responsible-Changed-By: wosch 
Responsible-Changed-When: Tue Sep 24 17:14:26 PDT 1996 
Responsible-Changed-Why:  
State-Changed-From-To: analyzed->suspended 
State-Changed-By: bde 
State-Changed-When: Tue Sep 24 20:25:56 PDT 1996 
State-Changed-Why:  
This was fixed before it was reported, in rev.1.42 of cpufunc.h, 
but only in -current.  I'm not happy with closing PR's that 
still apply to -stable. 
State-Changed-From-To: suspended->closed 
State-Changed-By: phk 
State-Changed-When: Mon Apr 13 01:42:56 PDT 1998 
State-Changed-Why:  
I am. 


Responsible-Changed-From-To: peter->freebsd-bugs 
Responsible-Changed-By: phk 
Responsible-Changed-When: Mon Apr 13 01:42:56 PDT 1998 
Responsible-Changed-Why:  
>Unformatted:
