NetBSD Problem Report #1259

From gnats  Sat Jul 22 23:27:11 1995
Received: from Reno.Stanford.EDU (Reno.Stanford.EDU [36.18.0.71]) by sun-lamp.pc.cs.cmu.edu (8.6.11/8.6.10) with ESMTP id XAA11080 for <gnats-bugs@gnats.netbsd.org>; Sat, 22 Jul 1995 23:27:11 -0400
Message-Id: <199507230323.UAA03300@Reno.Stanford.EDU>
Date: Sat, 22 Jul 1995 20:23:38 -0700
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Reply-To: jonathan@DSG.Stanford.EDU
To: gnats-bugs@gnats.netbsd.org
Subject: lint in sys/conf.h
X-Send-Pr-Version: 3.2

>Number:         1259
>Category:       kern
>Synopsis:       lint in sys/conf.h
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 22 23:35:02 +0000 1995
>Closed-Date:    Mon Aug 14 05:05:49 +0000 1995
>Last-Modified:  Mon Aug 14 05:06:20 +0000 1995
>Originator:     Jonathan Stone
>Release:        NetBSD-current at 1995-07-21
>Organization:

>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:
	usr/src/sys/sys/conf.h contains some non-prototyped function
	declarations: for the d_dump entry in struct bdevsw, for ports
	where __BDEVSW_DUMP_OLD_TYPE is defined; and for the d_mmap
	entry in struct cdevsw.

>How-To-Repeat:
	compile a kernel with, e.g.,
	cc -O -Wall -Wstrict-prototypes -Wmissing-prototypes.
>Fix:
	The following adds a prototype for the d_mmap entry in the cdevsw.
	I'm not sure what to do about the d_dump() routine, other
	than moving all NetBSD ports that're still using machine-dependent
	dump interfaces to the ``new'', prototyped d_dump interface.

*** /usr/src/sys/sys/conf.h	Tue Jul  4 23:57:54 1995
--- /usr/src/sys/sys/conf.h.dsg	Sat Jul 22 02:50:41 1995
***************
*** 150,156 ****
  	struct tty *
  		(*d_tty)	__P((dev_t dev));
  	int	(*d_select)	__P((dev_t dev, int which, struct proc *p));
! 	int	(*d_mmap)	__P(());
  	int	d_type;
  };

--- 150,156 ----
  	struct tty *
  		(*d_tty)	__P((dev_t dev));
  	int	(*d_select)	__P((dev_t dev, int which, struct proc *p));
! 	int	(*d_mmap)	__P((dev_t, int, int));
  	int	d_type;
  };

***************
*** 164,170 ****
  #define	dev_type_stop(n)	int n __P((struct tty *, int))
  #define	dev_type_tty(n)		struct tty *n __P((dev_t))
  #define	dev_type_select(n)	int n __P((dev_t, int, struct proc *))
! #define	dev_type_mmap(n)	int n __P(())

  #define	cdev_decl(n) \
  	dev_decl(n,open); dev_decl(n,close); dev_decl(n,read); \
--- 164,170 ----
  #define	dev_type_stop(n)	int n __P((struct tty *, int))
  #define	dev_type_tty(n)		struct tty *n __P((dev_t))
  #define	dev_type_select(n)	int n __P((dev_t, int, struct proc *))
! #define	dev_type_mmap(n)	int n __P((dev_t, int, int))

  #define	cdev_decl(n) \
  	dev_decl(n,open); dev_decl(n,close); dev_decl(n,read); \

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: cgd 
State-Changed-When: Mon Aug 14 01:05:49 EDT 1995 
State-Changed-Why:  
fix, as suggested. 
>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.