Subject: pkg/7495: devel/ptl2 fix for warning
To: None <gnats-bugs@gnats.netbsd.org>
From: Michael Graff <explorer@flame.org>
List: netbsd-bugs
Date: 04/28/1999 21:35:51
>Number:         7495
>Category:       pkg
>Synopsis:       devel/ptl2 warning fix
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager (NetBSD software packages system bug manager)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 28 21:35:00 1999
>Last-Modified:
>Originator:     Michael Graff
>Organization:
flame.org
>Release:        1.4_BETA
>Environment:
	
System: NetBSD frankenstein.flame.org 1.3K NetBSD 1.3K (SONY) #0: Wed Mar 3 02:37:25 PST 1999 explorer@frankenstein.flame.org:/u0/OS/NetBSD/src/sys/arch/i386/compile/SONY i386


>Description:
The ptl2 package is very nice, and even works.  However, one minor nit is
that warnings are generated on every compile.

The warnings come from lack of proper prototypes.

Adding a few voids here and there shut them up.
>How-To-Repeat:
Compile anything under ptl2.
>Fix:
--- include/sys/pthread-init.h~	Wed Apr 28 14:30:28 1999
+++ include/sys/pthread-init.h	Wed Apr 28 20:49:27 1999
@@ -15,9 +15,9 @@
  * Initialize the PTL
  */
 # ifdef __GNUC__
-static void _pthread_inithook() __attribute__((constructor));
-extern void _pthread_init();
-static void _pthread_inithook() { _pthread_init(); }
+static void _pthread_inithook(void) __attribute__((constructor));
+extern void _pthread_init(void);
+static void _pthread_inithook(void) { _pthread_init(); }
 # else
 #  define main __pthread_main
 # endif /*!__GNUC__*/

>Audit-Trail:
>Unformatted: