Fix gcc invalid prototype warnings

Gcc -Wall warn: 'invalid prototype'

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
Brian Behlendorf 2010-08-26 09:52:41 -07:00
parent 0ccd9d24e4
commit 0bc8fd7884
11 changed files with 57 additions and 57 deletions

View File

@ -87,7 +87,7 @@ libzfs_handle_t *g_zfs;
* debugging facilities. * debugging facilities.
*/ */
const char * const char *
_umem_debug_init() _umem_debug_init(void)
{ {
return ("default,verbose"); /* $UMEM_DEBUG setting */ return ("default,verbose"); /* $UMEM_DEBUG setting */
} }
@ -1221,7 +1221,7 @@ static boolean_t sa_loaded;
sa_attr_type_t *sa_attr_table; sa_attr_type_t *sa_attr_table;
static void static void
fuid_table_destroy() fuid_table_destroy(void)
{ {
if (fuid_table_loaded) { if (fuid_table_loaded) {
zfs_fuid_table_destroy(&idx_tree, &domain_tree); zfs_fuid_table_destroy(&idx_tree, &domain_tree);

View 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); (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 { typedef struct zil_rec_info {
zil_prt_rec_func_t zri_print; zil_prt_rec_func_t zri_print;
char *zri_name; char *zri_name;
@ -248,27 +248,27 @@ typedef struct zil_rec_info {
} zil_rec_info_t; } zil_rec_info_t;
static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = { static zil_rec_info_t zil_rec_info[TX_MAX_TYPE] = {
{ NULL, "Total " }, { NULL, "Total " },
{ zil_prt_rec_create, "TX_CREATE " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE " },
{ zil_prt_rec_create, "TX_MKDIR " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR " },
{ zil_prt_rec_create, "TX_MKXATTR " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKXATTR " },
{ zil_prt_rec_create, "TX_SYMLINK " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_SYMLINK " },
{ zil_prt_rec_remove, "TX_REMOVE " }, { (zil_prt_rec_func_t)zil_prt_rec_remove, "TX_REMOVE " },
{ zil_prt_rec_remove, "TX_RMDIR " }, { (zil_prt_rec_func_t)zil_prt_rec_remove, "TX_RMDIR " },
{ zil_prt_rec_link, "TX_LINK " }, { (zil_prt_rec_func_t)zil_prt_rec_link, "TX_LINK " },
{ zil_prt_rec_rename, "TX_RENAME " }, { (zil_prt_rec_func_t)zil_prt_rec_rename, "TX_RENAME " },
{ zil_prt_rec_write, "TX_WRITE " }, { (zil_prt_rec_func_t)zil_prt_rec_write, "TX_WRITE " },
{ zil_prt_rec_truncate, "TX_TRUNCATE " }, { (zil_prt_rec_func_t)zil_prt_rec_truncate, "TX_TRUNCATE " },
{ zil_prt_rec_setattr, "TX_SETATTR " }, { (zil_prt_rec_func_t)zil_prt_rec_setattr, "TX_SETATTR " },
{ zil_prt_rec_acl, "TX_ACL_V0 " }, { (zil_prt_rec_func_t)zil_prt_rec_acl, "TX_ACL_V0 " },
{ zil_prt_rec_acl, "TX_ACL_ACL " }, { (zil_prt_rec_func_t)zil_prt_rec_acl, "TX_ACL_ACL " },
{ zil_prt_rec_create, "TX_CREATE_ACL " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ACL " },
{ zil_prt_rec_create, "TX_CREATE_ATTR " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ATTR " },
{ zil_prt_rec_create, "TX_CREATE_ACL_ATTR " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_CREATE_ACL_ATTR " },
{ zil_prt_rec_create, "TX_MKDIR_ACL " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ACL " },
{ zil_prt_rec_create, "TX_MKDIR_ATTR " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ATTR " },
{ zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " }, { (zil_prt_rec_func_t)zil_prt_rec_create, "TX_MKDIR_ACL_ATTR " },
{ zil_prt_rec_write, "TX_WRITE2 " }, { (zil_prt_rec_func_t)zil_prt_rec_write, "TX_WRITE2 " },
}; };
/* ARGSUSED */ /* ARGSUSED */

View File

@ -359,7 +359,7 @@ static void usage(boolean_t) __NORETURN;
* debugging facilities. * debugging facilities.
*/ */
const char * const char *
_umem_debug_init() _umem_debug_init(void)
{ {
return ("default,verbose"); /* $UMEM_DEBUG setting */ 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] = { zil_replay_func_t *ztest_replay_vector[TX_MAX_TYPE] = {
NULL, /* 0 no such transaction type */ NULL, /* 0 no such transaction type */
ztest_replay_create, /* TX_CREATE */ (zil_replay_func_t *)ztest_replay_create, /* TX_CREATE */
NULL, /* TX_MKDIR */ NULL, /* TX_MKDIR */
NULL, /* TX_MKXATTR */ NULL, /* TX_MKXATTR */
NULL, /* TX_SYMLINK */ NULL, /* TX_SYMLINK */
ztest_replay_remove, /* TX_REMOVE */ (zil_replay_func_t *)ztest_replay_remove, /* TX_REMOVE */
NULL, /* TX_RMDIR */ NULL, /* TX_RMDIR */
NULL, /* TX_LINK */ NULL, /* TX_LINK */
NULL, /* TX_RENAME */ NULL, /* TX_RENAME */
ztest_replay_write, /* TX_WRITE */ (zil_replay_func_t *)ztest_replay_write, /* TX_WRITE */
ztest_replay_truncate, /* TX_TRUNCATE */ (zil_replay_func_t *)ztest_replay_truncate, /* TX_TRUNCATE */
ztest_replay_setattr, /* TX_SETATTR */ (zil_replay_func_t *)ztest_replay_setattr, /* TX_SETATTR */
NULL, /* TX_ACL */ NULL, /* TX_ACL */
NULL, /* TX_CREATE_ACL */ NULL, /* TX_CREATE_ACL */
NULL, /* TX_CREATE_ATTR */ NULL, /* TX_CREATE_ATTR */
NULL, /* TX_CREATE_ACL_ATTR */ NULL, /* TX_CREATE_ACL_ATTR */
NULL, /* TX_MKDIR_ACL */ NULL, /* TX_MKDIR_ACL */
NULL, /* TX_MKDIR_ATTR */ NULL, /* TX_MKDIR_ATTR */
NULL, /* TX_MKDIR_ACL_ATTR */ NULL, /* TX_MKDIR_ACL_ATTR */
NULL, /* TX_WRITE2 */ NULL, /* TX_WRITE2 */
}; };
/* /*
@ -5379,7 +5379,7 @@ print_time(hrtime_t t, char *timebuf)
} }
static nvlist_t * static nvlist_t *
make_random_props() make_random_props(void)
{ {
nvlist_t *props; nvlist_t *props;

View File

@ -3878,7 +3878,7 @@ out:
* Free buffers that were tagged for destruction. * Free buffers that were tagged for destruction.
*/ */
static void static void
l2arc_do_free_on_write() l2arc_do_free_on_write(void)
{ {
list_t *buflist; list_t *buflist;
l2arc_data_free_t *df, *df_prev; l2arc_data_free_t *df, *df_prev;

View 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); int dmu_xuio_cnt(struct xuio *uio);
struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i); struct arc_buf *dmu_xuio_arcbuf(struct xuio *uio, int i);
void dmu_xuio_clear(struct xuio *uio, int i); void dmu_xuio_clear(struct xuio *uio, int i);
void xuio_stat_wbuf_copied(); void xuio_stat_wbuf_copied(void);
void xuio_stat_wbuf_nocopy(); void xuio_stat_wbuf_nocopy(void);
extern int zfs_prefetch_disable; extern int zfs_prefetch_disable;

View 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 sa_replace_all_by_template_locked(sa_handle_t *, sa_bulk_attr_t *,
int, dmu_tx_t *); int, dmu_tx_t *);
boolean_t sa_enabled(objset_t *); boolean_t sa_enabled(objset_t *);
void sa_cache_init(); void sa_cache_init(void);
void sa_cache_fini(); void sa_cache_fini(void);
int sa_set_sa_object(objset_t *, uint64_t); int sa_set_sa_object(objset_t *, uint64_t);
int sa_hdrsize(void *); int sa_hdrsize(void *);
void sa_handle_lock(sa_handle_t *); void sa_handle_lock(sa_handle_t *);

View File

@ -674,7 +674,7 @@ extern void vdev_cache_stat_fini(void);
/* Initialization and termination */ /* Initialization and termination */
extern void spa_init(int flags); extern void spa_init(int flags);
extern void spa_fini(void); extern void spa_fini(void);
extern void spa_boot_init(); extern void spa_boot_init(void);
/* properties */ /* properties */
extern int spa_prop_set(spa_t *spa, nvlist_t *nvp); extern int spa_prop_set(spa_t *spa, nvlist_t *nvp);

View File

@ -309,8 +309,8 @@ extern int zfs_rezget(znode_t *);
extern void zfs_zinactive(znode_t *); extern void zfs_zinactive(znode_t *);
extern void zfs_znode_delete(znode_t *, dmu_tx_t *); extern void zfs_znode_delete(znode_t *, dmu_tx_t *);
extern void zfs_znode_free(znode_t *); extern void zfs_znode_free(znode_t *);
extern void zfs_remove_op_tables(); extern void zfs_remove_op_tables(void);
extern int zfs_create_op_tables(); extern int zfs_create_op_tables(void);
extern int zfs_sync(vfs_t *vfsp, short flag, cred_t *cr); extern int zfs_sync(vfs_t *vfsp, short flag, cred_t *cr);
extern dev_t zfs_cmpldev(uint64_t); extern dev_t zfs_cmpldev(uint64_t);
extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value); extern int zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value);

View File

@ -376,7 +376,7 @@ typedef int zil_parse_blk_func_t(zilog_t *zilog, blkptr_t *bp, void *arg,
uint64_t txg); uint64_t txg);
typedef int zil_parse_lr_func_t(zilog_t *zilog, lr_t *lr, void *arg, typedef int zil_parse_lr_func_t(zilog_t *zilog, lr_t *lr, void *arg,
uint64_t txg); 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); 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, extern int zil_parse(zilog_t *zilog, zil_parse_blk_func_t *parse_blk_func,

View File

@ -175,7 +175,7 @@ spa_history_write(spa_t *spa, void *buf, uint64_t len, spa_history_phys_t *shpp,
} }
static char * static char *
spa_history_zone() spa_history_zone(void)
{ {
#ifdef _KERNEL #ifdef _KERNEL
return (curproc->p_zone->zone_name); return (curproc->p_zone->zone_name);

View File

@ -1516,7 +1516,7 @@ spa_busy(void)
} }
void void
spa_boot_init() spa_boot_init(void)
{ {
spa_config_load(); spa_config_load();
} }