Subject: kern/1258: lack of prototyping
To: None <gnats-bugs@gnats.netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: netbsd-bugs
Date: 07/22/1995 19:55:36
>Number: 1258
>Category: kern
>Synopsis: lack of prototyping
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Sat Jul 22 23:05:01 1995
>Last-Modified:
>Originator: Jonathan Stone
>Organization:
>Release: NetBSD-current as at 1995-07-21
>Environment:
System: NetBSD Reno.Stanford.EDU 1.0A NetBSD 1.0A (CURRENT) #401: Fri Jul 21 18:27:58 PDT 1995 jonathan@Reno.Stanford.EDU:/usr/src/sys/arch/pmax/compile/CURRENT pmax
>Description:
src/sys/lib/libkern/libkern.h declares several functions but
doesn't provide prototypes. A (very quick) perusal of the
kernel source didn't turn up any declarations whatsoever
of the (static) functions in libkern.h
>How-To-Repeat:
Compile a kernel with -Werror -Wall -Wmissing-prototypes
Wstrict-prototypes.
>Fix:
The following patch provides declarations of these functions.
*** /usr/src/sys/lib/libkern/libkern.h Mon Nov 21 14:46:11 1994
--- /usr/src/sys/lib/libkern/libkern.h.dsg Sat Jul 22 19:56:30 1995
***************
*** 37,42 ****
--- 37,47 ----
#include <sys/types.h>
+ static __inline int imax __P((int, int)), imin __P((int,int));
+ static __inline long lmax __P((long, long)), lmin __P((long, long));
+ static __inline u_int max __P((u_int, u_int)), min __P((u_int,u_int));
+ static __inline u_long ulmax __P((u_long,u_long)), ulmin __P((u_long,u_long));
+
static __inline int
imax(a, b)
int a, b;
>Audit-Trail:
>Unformatted: