aboutsummaryrefslogtreecommitdiff
path: root/sys/fs/nullfs
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1995-11-09 08:17:23 +0000
committerBruce Evans <bde@FreeBSD.org>1995-11-09 08:17:23 +0000
commitf57e65478df5b3ada8a4f7afb89a6cc633bb55fd (patch)
treed1df2f42cd1cf04bc5757d3dff0d353c3e6a3a58 /sys/fs/nullfs
parent932c2f65d3ce95d07fb96839ebb32c8953771e27 (diff)
downloadsrc-f57e65478df5b3ada8a4f7afb89a6cc633bb55fd.tar.gz
src-f57e65478df5b3ada8a4f7afb89a6cc633bb55fd.zip
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.
Notes
Notes: svn path=/head/; revision=12158
Diffstat (limited to 'sys/fs/nullfs')
-rw-r--r--sys/fs/nullfs/null.h4
-rw-r--r--sys/fs/nullfs/null_vnops.c20
2 files changed, 12 insertions, 12 deletions
diff --git a/sys/fs/nullfs/null.h b/sys/fs/nullfs/null.h
index 14286ffeee0c..f95724970d65 100644
--- a/sys/fs/nullfs/null.h
+++ b/sys/fs/nullfs/null.h
@@ -35,7 +35,7 @@
*
* @(#)null.h 8.2 (Berkeley) 1/21/94
*
- * $Id: lofs.h,v 1.8 1992/05/30 10:05:43 jsp Exp jsp $
+ * $Id: null.h,v 1.1.1.1 1994/05/24 10:05:04 rgrimes Exp $
*/
struct null_args {
@@ -70,6 +70,6 @@ extern struct vnode *null_checkvp __P((struct vnode *vp, char *fil, int lno));
#define NULLVPTOLOWERVP(vp) (VTONULL(vp)->null_lowervp)
#endif
-extern int (**null_vnodeop_p)();
+extern vop_t **null_vnodeop_p;
extern struct vfsops null_vfsops;
#endif /* KERNEL */
diff --git a/sys/fs/nullfs/null_vnops.c b/sys/fs/nullfs/null_vnops.c
index 464d15aa6246..41e9f700e9c5 100644
--- a/sys/fs/nullfs/null_vnops.c
+++ b/sys/fs/nullfs/null_vnops.c
@@ -35,7 +35,7 @@
*
* @(#)null_vnops.c 8.1 (Berkeley) 6/10/93
*
- * $Id: null_vnops.c,v 1.7 1995/03/19 14:28:54 davidg Exp $
+ * $Id: null_vnops.c,v 1.8 1995/05/30 08:07:03 rgrimes Exp $
*/
/*
@@ -441,19 +441,19 @@ null_bwrite(ap)
/*
* Global vfs data structures
*/
-int (**null_vnodeop_p)();
+vop_t **null_vnodeop_p;
struct vnodeopv_entry_desc null_vnodeop_entries[] = {
- { &vop_default_desc, null_bypass },
+ { &vop_default_desc, (vop_t *)null_bypass },
- { &vop_getattr_desc, null_getattr },
- { &vop_inactive_desc, null_inactive },
- { &vop_reclaim_desc, null_reclaim },
- { &vop_print_desc, null_print },
+ { &vop_getattr_desc, (vop_t *)null_getattr },
+ { &vop_inactive_desc, (vop_t *)null_inactive },
+ { &vop_reclaim_desc, (vop_t *)null_reclaim },
+ { &vop_print_desc, (vop_t *)null_print },
- { &vop_strategy_desc, null_strategy },
- { &vop_bwrite_desc, null_bwrite },
+ { &vop_strategy_desc, (vop_t *)null_strategy },
+ { &vop_bwrite_desc, (vop_t *)null_bwrite },
- { (struct vnodeop_desc*)NULL, (int(*)())NULL }
+ { NULL, NULL }
};
struct vnodeopv_desc null_vnodeop_opv_desc =
{ &null_vnodeop_p, null_vnodeop_entries };