From 09d8727498733c2957d96b9bbad875357f7f62e3 Mon Sep 17 00:00:00 2001 From: alex <alex> Date: Wed, 17 Aug 2005 16:07:18 +0000 Subject: [PATCH] - minor fixes against gcc's warnings --- lustre/mds/handler.c | 3 ++- lustre/mds/mds_capa.c | 2 +- lustre/obdfilter/filter_io.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c index b72fd1d9f3..075e942add 100644 --- a/lustre/mds/handler.c +++ b/lustre/mds/handler.c @@ -325,7 +325,7 @@ struct dentry *mds_id2dentry(struct obd_device *obd, struct lustre_id *id, struct dentry *result; struct inode *inode; unsigned long ino = 0; - __u32 generation; + __u32 generation = 0; char idname[32]; if (!id_ino(id) && id_fid(id)) { @@ -349,6 +349,7 @@ struct dentry *mds_id2dentry(struct obd_device *obd, struct lustre_id *id, } else { CERROR("invalid id for lookup " DLID4"\n", OLID4(id)); + LBUG(); } if (ino == 0) diff --git a/lustre/mds/mds_capa.c b/lustre/mds/mds_capa.c index 63f9aecf8e..dd85ab63b4 100644 --- a/lustre/mds/mds_capa.c +++ b/lustre/mds/mds_capa.c @@ -62,7 +62,7 @@ static int mds_write_capa_key(struct obd_device *obd, int force_sync) struct file *filp = mds->mds_capa_keys_filp; struct lvfs_run_ctxt saved; loff_t off = 0; - int i, rc; + int i, rc = 0; ENTRY; push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL); diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c index 337347ff8b..bb2d61a41d 100644 --- a/lustre/obdfilter/filter_io.c +++ b/lustre/obdfilter/filter_io.c @@ -498,13 +498,13 @@ static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa, struct obd_trans_info *oti) { int rc = 0, i, tot_bytes = 0, cleanup_phase = 0; + struct obd_device *obd = exp->exp_obd; struct niobuf_local *lnb = res; struct dentry *dentry = NULL; unsigned long now = jiffies; struct lvfs_run_ctxt saved; struct niobuf_remote *rnb; struct fsfilt_objinfo fso; - struct obd_device *obd; obd_size left; obd_uid uid; obd_gid gid; -- GitLab