Subject: kern/1259: lint in sys/conf.h
To: None <gnats-bugs@gnats.netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: netbsd-bugs
Date: 07/22/1995 20:23:38
>Number: 1259
>Category: kern
>Synopsis: lint in sys/conf.h
>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:35:02 1995
>Last-Modified:
>Originator: Jonathan Stone
>Organization:
>Release: NetBSD-current 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:
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); \
>Audit-Trail:
>Unformatted: