summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2010-08-26 09:52:41 -0700
committerBrian Behlendorf <[email protected]>2010-08-27 15:34:03 -0700
commit0bc8fd7884fc603eb7646c43b1fc0b18e37e7d62 (patch)
tree08033422554b4945355739c0ac59193a9d29acb7
parent0ccd9d24e4fdbe9cd07f838d0a62083e8eca95f2 (diff)
Fix gcc invalid prototype warnings
Gcc -Wall warn: 'invalid prototype' Signed-off-by: Brian Behlendorf <[email protected]>
-rw-r--r--cmd/zdb/zdb.c4
-rw-r--r--cmd/zdb/zdb_il.c44
-rw-r--r--cmd/ztest/ztest.c44
-rw-r--r--module/zfs/arc.c2
-rw-r--r--module/zfs/include/sys/dmu.h4
-rw-r--r--module/zfs/include/sys/sa.h4
-rw-r--r--module/zfs/include/sys/spa.h2
-rw-r--r--module/zfs/include/sys/zfs_znode.h4
-rw-r--r--module/zfs/include/sys/zil.h2
-rw-r--r--module/zfs/spa_history.c2
-rw-r--r--module/zfs/spa_misc.c2
11 files changed, 57 insertions, 57 deletions
diff --git a/cmd/zdb/zdb.c b/cmd/zdb/zdb.c
index 012d009dc..11af8c0c3 100644
--- a/cmd/zdb/zdb.c
+++ b/cmd/zdb/zdb.c
@@ -87,7 +87,7 @@ libzfs_handle_t *g_zfs;
* debugging facilities.
*/
const char *
-_umem_debug_init()
+_umem_debug_init(void)
{
return ("default,verbose"); /* $UMEM_DEBUG setting */
}
@@ -1221,7 +1221,7 @@ static boolean_t sa_loaded;
sa_attr_type_t *sa_attr_table;
static void
-fuid_table_destroy()
+fuid_table_destroy(void)
{
if (fuid_table_loaded) {
zfs_fuid_table_destroy(&idx_tree, &domain_tree);
diff --git a/cmd/zdb/zdb_il.c b/cmd/zdb/zdb_il.c
index a0ed985f5..257aa6f4b 100644
--- a/cmd/zdb/zdb_il.c
+++ b/cmd/zdb/zdb_il.c
@@ -240,7 +240,7 @@ zil_prt_rec_acl(zilog_t *zilog, int txtype, lr_acl_t *lr)
(u_longlong_t)lr->lr_foid, (u_longlong_t)lr->lr_aclcnt);
}
-typedef void (*zil_prt_rec_func_t)();
+typedef void (*zil_prt_rec_func_t)(zilog_t *, int, void *);
typedef struct zil_rec_info {
zil_prt_rec_func_t zri_print;
char *zri_name;
@@ -248,27 +248,27 @@ typedef struct zil_rec_info {
} zil_rec_info_t;
static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = {
- { NULL, "Total " },
- { zil_prt_rec_create, "TX_CREATE " },
- { zil_prt_rec_create, "TX_MKDIR " },
- { zil_prt_rec_create, "TX_MKXATTR " },
- { zil_prt_rec_create, "TX_SYMLINK " },
- { zil_prt_rec_remove, "TX_REMOVE " },
- { zil_prt_rec_remove, "TX_RMDIR " },
- { zil_prt_rec_link, "TX_LINK " },
- { zil_prt_rec_rename, "TX_RENAME " },
- { zil_prt_rec_write, "TX_WRITE " },
- { zil_prt_rec_truncate, "TX_TRUNCATE " },
- { zil_prt_rec_setattr, "TX_SETATTR " },
- { zil_prt_rec_acl, "TX_ACL_V0 " },
- { zil_prt_rec_acl, "TX_ACL_ACL " },
- { zil_prt_rec_create, "TX_CREATE_ACL " },
- { zil_prt_rec_create, "TX_CREATE_ATTR " },
- { zil_prt_rec_create, "TX_CREATE_ACL_ATTR " },
- { zil_prt_rec_create, "TX_MKDIR_ACL " },
- { zil_prt_rec_create, "TX_MKDIR_ATTR " },
- { zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " },
- { zil_prt_rec_write, "TX_WRITE2 " },
+ { NULL, "Total " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKXATTR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_SYMLINK " },
+ { (zil_prt_rec_func_t)zil_prt_rec_remove, "TX_REMOVE " },
+ { (zil_prt_rec_func_t)zil_prt_rec_remove, "TX_RMDIR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_link, "TX_LINK " },
+ { (zil_prt_rec_func_t)zil_prt_rec_rename, "TX_RENAME " },
+ { (zil_prt_rec_func_t)zil_prt_rec_write, "TX_WRITE " },
+ { (zil_prt_rec_func_t)zil_prt_rec_truncate, "TX_TRUNCATE " },
+ { (zil_prt_rec_func_t)zil_prt_rec_setattr, "TX_SETATTR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_acl, "TX_ACL_V0 " },
+ { (zil_prt_rec_func_t)zil_prt_rec_acl, "TX_ACL_ACL " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ACL " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ATTR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ACL_ATTR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ACL " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ATTR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " },
+ { (zil_prt_rec_func_t)zil_prt_rec_write, "TX_WRITE2 " },
};
/* ARGSUSED */
diff --git a/cmd/ztest/ztest.c b/cmd/ztest/ztest.c
index 5e21e620d..fbc3c2cc9 100644
--- a/cmd/ztest/ztest.c
+++ b/cmd/ztest/ztest.c
@@ -359,7 +359,7 @@ static void usage(boolean_t) __NORETURN;
* debugging facilities.
*/
const char *
-_umem_debug_init()
+_umem_debug_init(void)
{
return ("default,verbose"); /* $UMEM_DEBUG setting */
}
@@ -1579,26 +1579,26 @@ ztest_replay_setattr(ztest_ds_t *zd, lr_setattr_t *lr, boolean_t byteswap)
}
zil_replay_func_t *ztest_replay_vector[TX_MAX_TYPE] = {
- NULL, /* 0 no such transaction type */
- ztest_replay_create, /* TX_CREATE */
- NULL, /* TX_MKDIR */
- NULL, /* TX_MKXATTR */
- NULL, /* TX_SYMLINK */
- ztest_replay_remove, /* TX_REMOVE */
- NULL, /* TX_RMDIR */
- NULL, /* TX_LINK */
- NULL, /* TX_RENAME */
- ztest_replay_write, /* TX_WRITE */
- ztest_replay_truncate, /* TX_TRUNCATE */
- ztest_replay_setattr, /* TX_SETATTR */
- NULL, /* TX_ACL */
- NULL, /* TX_CREATE_ACL */
- NULL, /* TX_CREATE_ATTR */
- NULL, /* TX_CREATE_ACL_ATTR */
- NULL, /* TX_MKDIR_ACL */
- NULL, /* TX_MKDIR_ATTR */
- NULL, /* TX_MKDIR_ACL_ATTR */
- NULL, /* TX_WRITE2 */
+ NULL, /* 0 no such transaction type */
+ (zil_replay_func_t *)ztest_replay_create, /* TX_CREATE */
+ NULL, /* TX_MKDIR */
+ NULL, /* TX_MKXATTR */
+ NULL, /* TX_SYMLINK */
+ (zil_replay_func_t *)ztest_replay_remove, /* TX_REMOVE */
+ NULL, /* TX_RMDIR */
+ NULL, /* TX_LINK */
+ NULL, /* TX_RENAME */
+ (zil_replay_func_t *)ztest_replay_write, /* TX_WRITE */
+ (zil_replay_func_t *)ztest_replay_truncate, /* TX_TRUNCATE */
+ (zil_replay_func_t *)ztest_replay_setattr, /* TX_SETATTR */
+ NULL, /* TX_ACL */
+ NULL, /* TX_CREATE_ACL */
+ NULL, /* TX_CREATE_ATTR */
+ NULL, /* TX_CREATE_ACL_ATTR */
+ NULL, /* TX_MKDIR_ACL */
+ NULL, /* TX_MKDIR_ATTR */
+ NULL, /* TX_MKDIR_ACL_ATTR */
+ NULL, /* TX_WRITE2 */
};
/*
@@ -5379,7 +5379,7 @@ print_time(hrtime_t t, char *timebuf)
}
static nvlist_t *
-make_random_props()
+make_random_props(void)
{
nvlist_t *props;
diff --git a/module/zfs/arc.c b/module/zfs/arc.c
index e9db5340e..6b57f51ff 100644
--- a/module/zfs/arc.c
+++ b/module/zfs/arc.c
@@ -3878,7 +3878,7 @@ out:
* Free buffers that were tagged for destruction.
*/
static void
-l2arc_do_free_on_write()
+l2arc_do_free_on_write(void)
{
list_t *buflist;
l2arc_data_free_t *df, *df_prev;
diff --git a/module/zfs/include/sys/dmu.h b/module/zfs/include/sys/dmu.h
index 07f5949eb..4580170db 100644
--- a/module/zfs/include/sys/dmu.h
+++ b/module/zfs/include/sys/dmu.h
@@ -529,8 +529,8 @@ int dmu_xuio_add(struct xuio *uio, struct arc_buf *abuf, offset_t off,
int dmu_xuio_cnt(struct xuio *uio);
struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i);
void dmu_xuio_clear(struct xuio *uio, int i);
-void xuio_stat_wbuf_copied();
-void xuio_stat_wbuf_nocopy();
+void xuio_stat_wbuf_copied(void);
+void xuio_stat_wbuf_nocopy(void);
extern int zfs_prefetch_disable;
diff --git a/module/zfs/include/sys/sa.h b/module/zfs/include/sys/sa.h
index bc89fa07d..c8b924771 100644
--- a/module/zfs/include/sys/sa.h
+++ b/module/zfs/include/sys/sa.h
@@ -147,8 +147,8 @@ int sa_replace_all_by_template(sa_handle_t *, sa_bulk_attr_t *,
int sa_replace_all_by_template_locked(sa_handle_t *, sa_bulk_attr_t *,
int, dmu_tx_t *);
boolean_t sa_enabled(objset_t *);
-void sa_cache_init();
-void sa_cache_fini();
+void sa_cache_init(void);
+void sa_cache_fini(void);
int sa_set_sa_object(objset_t *, uint64_t);
int sa_hdrsize(void *);
void sa_handle_lock(sa_handle_t *);
diff --git a/module/zfs/include/sys/spa.h b/module/zfs/include/sys/spa.h
index 7ebbbb2cd..52737ebc2 100644
--- a/module/zfs/include/sys/spa.h
+++ b/module/zfs/include/sys/spa.h
@@ -674,7 +674,7 @@ extern void vdev_cache_stat_fini(void);
/* Initialization and termination */
extern void spa_init(int flags);
extern void spa_fini(void);
-extern void spa_boot_init();
+extern void spa_boot_init(void);
/* properties */
extern int spa_prop_set(spa_t *spa, nvlist_t *nvp);
diff --git a/module/zfs/include/sys/zfs_znode.h b/module/zfs/include/sys/zfs_znode.h
index 7fa7a0ae9..9d4b913ed 100644
--- a/module/zfs/include/sys/zfs_znode.h
+++ b/module/zfs/include/sys/zfs_znode.h
@@ -309,8 +309,8 @@ extern int zfs_rezget(znode_t *);
extern void zfs_zinactive(znode_t *);
extern void zfs_znode_delete(znode_t *, dmu_tx_t *);
extern void zfs_znode_free(znode_t *);
-extern void zfs_remove_op_tables();
-extern int zfs_create_op_tables();
+extern void zfs_remove_op_tables(void);
+extern int zfs_create_op_tables(void);
extern int zfs_sync(vfs_t *vfsp, short flag, cred_t *cr);
extern dev_t zfs_cmpldev(uint64_t);
extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value);
diff --git a/module/zfs/include/sys/zil.h b/module/zfs/include/sys/zil.h
index a4c5575b2..45900c981 100644
--- a/module/zfs/include/sys/zil.h
+++ b/module/zfs/include/sys/zil.h
@@ -376,7 +376,7 @@ typedef int zil_parse_blk_func_t(zilog_t *zilog, blkptr_t *bp, void *arg,
uint64_t txg);
typedef int zil_parse_lr_func_t(zilog_t *zilog, lr_t *lr, void *arg,
uint64_t txg);
-typedef int zil_replay_func_t();
+typedef int zil_replay_func_t(void *, char *, boolean_t);
typedef int zil_get_data_t(void *arg, lr_write_t *lr, char *dbuf, zio_t *zio);
extern int zil_parse(zilog_t *zilog, zil_parse_blk_func_t *parse_blk_func,
diff --git a/module/zfs/spa_history.c b/module/zfs/spa_history.c
index 212abae5b..a65f16bcc 100644
--- a/module/zfs/spa_history.c
+++ b/module/zfs/spa_history.c
@@ -175,7 +175,7 @@ spa_history_write(spa_t *spa, void *buf, uint64_t len, spa_history_phys_t *shpp,
}
static char *
-spa_history_zone()
+spa_history_zone(void)
{
#ifdef _KERNEL
return (curproc->p_zone->zone_name);
diff --git a/module/zfs/spa_misc.c b/module/zfs/spa_misc.c
index 228ed1376..cd8a6c875 100644
--- a/module/zfs/spa_misc.c
+++ b/module/zfs/spa_misc.c
@@ -1516,7 +1516,7 @@ spa_busy(void)
}
void
-spa_boot_init()
+spa_boot_init(void)
{
spa_config_load();
}