diff options
author | bde <bde@FreeBSD.org> | 1995-11-09 08:17:23 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1995-11-09 08:17:23 +0000 |
commit | 449a11eb8852c894681575cf4226b1c639a2f9bc (patch) | |
tree | d1df2f42cd1cf04bc5757d3dff0d353c3e6a3a58 /sys/fs/umapfs | |
parent | 7b39ff1acd679291e1eaa968c4a256d7c6e3b22f (diff) | |
download | FreeBSD-src-449a11eb8852c894681575cf4226b1c639a2f9bc.zip FreeBSD-src-449a11eb8852c894681575cf4226b1c639a2f9bc.tar.gz |
Introduced a type `vop_t' for vnode operation functions and used
it 1138 times (:-() in casts and a few more times in declarations.
This change is null for the i386.
The type has to be `typedef int vop_t(void *)' and not `typedef
int vop_t()' because `gcc -Wstrict-prototypes' warns about the
latter. Since vnode op functions are called with args of different
(struct pointer) types, neither of these function types is any use
for type checking of the arg, so it would be preferable not to use
the complete function type, especially since using the complete
type requires adding 1138 casts to avoid compiler warnings and
another 40+ casts to reverse the function pointer conversions before
calling the functions.
Diffstat (limited to 'sys/fs/umapfs')
-rw-r--r-- | sys/fs/umapfs/umap.h | 4 | ||||
-rw-r--r-- | sys/fs/umapfs/umap_vnops.c | 22 |
2 files changed, 13 insertions, 13 deletions
diff --git a/sys/fs/umapfs/umap.h b/sys/fs/umapfs/umap.h index 5be2e5e..ad78ccd 100644 --- a/sys/fs/umapfs/umap.h +++ b/sys/fs/umapfs/umap.h @@ -35,7 +35,7 @@ * * @(#)umap.h 8.3 (Berkeley) 1/21/94 * - * $Id: umap.h,v 1.2 1994/08/02 07:45:33 davidg Exp $ + * $Id: umap.h,v 1.3 1995/05/30 08:07:15 rgrimes Exp $ */ #define MAPFILEENTRIES 64 @@ -87,6 +87,6 @@ extern struct vnode *umap_checkvp __P((struct vnode *vp, char *fil, int lno)); #define UMAPVPTOLOWERVP(vp) (VTOUMAP(vp)->umap_lowervp) #endif -extern int (**umap_vnodeop_p)(); +extern vop_t **umap_vnodeop_p; extern struct vfsops umap_vfsops; #endif /* KERNEL */ diff --git a/sys/fs/umapfs/umap_vnops.c b/sys/fs/umapfs/umap_vnops.c index a82d1c6..1d2d586 100644 --- a/sys/fs/umapfs/umap_vnops.c +++ b/sys/fs/umapfs/umap_vnops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)umap_vnops.c 8.3 (Berkeley) 1/5/94 - * $Id: umap_vnops.c,v 1.8 1995/03/19 14:28:55 davidg Exp $ + * $Id: umap_vnops.c,v 1.9 1995/05/30 08:07:22 rgrimes Exp $ */ /* @@ -471,20 +471,20 @@ umap_rename(ap) * go away with a merged buffer/block cache. * */ -int (**umap_vnodeop_p)(); +vop_t **umap_vnodeop_p; struct vnodeopv_entry_desc umap_vnodeop_entries[] = { - { &vop_default_desc, umap_bypass }, + { &vop_default_desc, (vop_t *)umap_bypass }, - { &vop_getattr_desc, umap_getattr }, - { &vop_inactive_desc, umap_inactive }, - { &vop_reclaim_desc, umap_reclaim }, - { &vop_print_desc, umap_print }, - { &vop_rename_desc, umap_rename }, + { &vop_getattr_desc, (vop_t *)umap_getattr }, + { &vop_inactive_desc, (vop_t *)umap_inactive }, + { &vop_reclaim_desc, (vop_t *)umap_reclaim }, + { &vop_print_desc, (vop_t *)umap_print }, + { &vop_rename_desc, (vop_t *)umap_rename }, - { &vop_strategy_desc, umap_strategy }, - { &vop_bwrite_desc, umap_bwrite }, + { &vop_strategy_desc, (vop_t *)umap_strategy }, + { &vop_bwrite_desc, (vop_t *)umap_bwrite }, - { (struct vnodeop_desc*) NULL, (int(*)()) NULL } + { NULL, NULL } }; struct vnodeopv_desc umap_vnodeop_opv_desc = { &umap_vnodeop_p, umap_vnodeop_entries }; |