From 15e43f274e35415bfdb3b962e72c632e8f6e0350 Mon Sep 17 00:00:00 2001 From: nathan <nathan> Date: Mon, 5 Nov 2007 19:00:54 +0000 Subject: [PATCH] fix various compiler warnings --- lustre/include/lprocfs_status.h | 5 ++--- lustre/obdclass/linux/linux-sysctl.c | 2 +- lustre/obdclass/lprocfs_status.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index b31ed27d49..31b7380e56 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -309,7 +309,6 @@ extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index, const char *units); extern void lprocfs_free_obd_stats(struct obd_device *obddev); struct obd_export; -struct nid_stat; extern int lprocfs_add_clear_entry(struct obd_device * obd, cfs_proc_dir_entry_t *entry); extern int lprocfs_exp_setup(struct obd_export *exp, @@ -318,8 +317,6 @@ extern int lprocfs_exp_cleanup(struct obd_export *exp); extern int lprocfs_add_simple(struct proc_dir_entry *root, char *name, read_proc_t *read_proc, write_proc_t *write_proc, void *data); -extern void lprocfs_free_client_stats(struct nid_stat *stat); -extern void lprocfs_free_per_client_stats(struct obd_device *obd); extern int lprocfs_register_stats(cfs_proc_dir_entry_t *root, const char *name, struct lprocfs_stats *stats); @@ -356,6 +353,7 @@ extern int lprocfs_obd_cleanup(struct obd_device *obd); extern int lprocfs_add_simple(struct proc_dir_entry *root, char *name, read_proc_t *read_proc, write_proc_t *write_proc, void *data); +struct nid_stat; extern void lprocfs_free_client_stats(struct nid_stat *stat); extern void lprocfs_free_per_client_stats(struct obd_device *obd); extern struct file_operations lprocfs_evict_client_fops; @@ -563,6 +561,7 @@ static inline int lprocfs_add_simple(struct proc_dir_entry *root, write_proc_t *write_proc, void *data) {return 0; } +struct nid_stat; static inline void lprocfs_free_client_stats(struct nid_stat *stat){} static inline void lprocfs_free_per_client_stats(struct obd_device *obd) {} diff --git a/lustre/obdclass/linux/linux-sysctl.c b/lustre/obdclass/linux/linux-sysctl.c index 6712912af1..cde91b124c 100644 --- a/lustre/obdclass/linux/linux-sysctl.c +++ b/lustre/obdclass/linux/linux-sysctl.c @@ -91,8 +91,8 @@ int LL_PROC_PROTO(proc_set_timeout) #ifdef RANDOM_FAIL_ALLOC int LL_PROC_PROTO(proc_alloc_fail_rate) { - DECLARE_LL_PROC_PPOS_DECL; int rc = 0; + DECLARE_LL_PROC_PPOS_DECL; if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) { *lenp = 0; diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index e788047c30..2e529da601 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -1171,7 +1171,7 @@ int lprocfs_exp_rd_nid(char *page, char **start, off_t off, int count, void lprocfs_exp_print_uuid(void *cb_data) { - struct exp_uuid_cb_data *data = (struct exp_rd_uuid_cb_data *)cb_data; + struct exp_uuid_cb_data *data = (struct exp_uuid_cb_data *)cb_data; if (data->exp->exp_nid_stats) *data->len += snprintf((data->page + *data->len), -- GitLab