Fix gcc invalid prototype warnings
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 26 Aug 2010 16:52:41 +0000 (09:52 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 27 Aug 2010 22:34:03 +0000 (15:34 -0700)
Gcc -Wall warn: 'invalid prototype'

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
cmd/zdb/zdb.c
cmd/zdb/zdb_il.c
cmd/ztest/ztest.c
module/zfs/arc.c
module/zfs/include/sys/dmu.h
module/zfs/include/sys/sa.h
module/zfs/include/sys/spa.h
module/zfs/include/sys/zfs_znode.h
module/zfs/include/sys/zil.h
module/zfs/spa_history.c
module/zfs/spa_misc.c

index 012d009..11af8c0 100644 (file)
@@ -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);
index a0ed985..257aa6f 100644 (file)
@@ -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 */
index 5e21e62..fbc3c2c 100644 (file)
@@ -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;
 
index e9db534..6b57f51 100644 (file)
@@ -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;
index 07f5949..4580170 100644 (file)
@@ -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;
 
index bc89fa0..c8b9247 100644 (file)
@@ -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 *);
index 7ebbbb2..52737eb 100644 (file)
@@ -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);
index 7fa7a0a..9d4b913 100644 (file)
@@ -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);
index a4c5575..45900c9 100644 (file)
@@ -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,
index 212abae..a65f16b 100644 (file)
@@ -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);
index 228ed13..cd8a6c8 100644 (file)
@@ -1516,7 +1516,7 @@ spa_busy(void)
 }
 
 void
-spa_boot_init()
+spa_boot_init(void)
 {
        spa_config_load();
 }