From 2d5f51b92f6eb45e9fd6ae57f8d9ec349049ea14 Mon Sep 17 00:00:00 2001 From: Sebastien Buisson Date: Tue, 2 Apr 2013 14:14:18 +0200 Subject: [PATCH] LU-3086 build: fix 'uninitialized variables' errors Fix 'uninitialized variables' defects found by Coverity version 6.5.1: Uninitialized scalar variable (UNINIT) Using uninitialized value. Signed-off-by: Sebastien Buisson Change-Id: I8df7c60823e392b37880ca5ddb1ea107554784e6 Reviewed-on: http://review.whamcloud.com/5916 Reviewed-by: Dmitry Eremin Tested-by: Hudson Tested-by: Maloo Reviewed-by: John Hammond Reviewed-by: Oleg Drokin --- lustre/mdt/mdt_open.c | 2 +- lustre/obdclass/cl_page.c | 2 +- lustre/osc/osc_request.c | 4 ++-- lustre/osd-ldiskfs/osd_quota.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lustre/mdt/mdt_open.c b/lustre/mdt/mdt_open.c index 3359d5e..456f403 100644 --- a/lustre/mdt/mdt_open.c +++ b/lustre/mdt/mdt_open.c @@ -1276,7 +1276,7 @@ int mdt_open_by_fid_lock(struct mdt_thread_info *info, struct ldlm_reply *rep, struct mdt_object *parent= NULL; struct mdt_object *o; int rc; - __u64 ibits; + __u64 ibits = 0; ENTRY; if (md_should_create(flags) && !(flags & MDS_OPEN_HAS_EA)) { diff --git a/lustre/obdclass/cl_page.c b/lustre/obdclass/cl_page.c index a9d8146..da98d9f 100644 --- a/lustre/obdclass/cl_page.c +++ b/lustre/obdclass/cl_page.c @@ -325,7 +325,7 @@ static struct cl_page *cl_page_alloc(const struct lu_env *env, OBD_ALLOC_GFP(page, cl_object_header(o)->coh_page_bufsize, CFS_ALLOC_IO); if (page != NULL) { - int result; + int result = 0; cfs_atomic_set(&page->cp_ref, 1); if (type == CPT_CACHEABLE) /* for radix tree */ cfs_atomic_inc(&page->cp_ref); diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 881ab54..4092d93 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -1214,8 +1214,8 @@ static obd_count osc_checksum_bulk(int nob, obd_count pg_count, cfs_crypto_hash_update_page(hdesc, pga[i]->pg, pga[i]->off & ~CFS_PAGE_MASK, count); - LL_CDEBUG_PAGE(D_PAGE, pga[i]->pg, "off %d checksum %x\n", - (int)(pga[i]->off & ~CFS_PAGE_MASK), cksum); + LL_CDEBUG_PAGE(D_PAGE, pga[i]->pg, "off %d\n", + (int)(pga[i]->off & ~CFS_PAGE_MASK)); nob -= pga[i]->count; pg_count--; diff --git a/lustre/osd-ldiskfs/osd_quota.c b/lustre/osd-ldiskfs/osd_quota.c index 39059f0..f85bef7 100644 --- a/lustre/osd-ldiskfs/osd_quota.c +++ b/lustre/osd-ldiskfs/osd_quota.c @@ -968,7 +968,7 @@ int osd_quota_migration(const struct lu_env *env, struct dt_object *dt, struct dt_object *root, *parent = NULL, *admin = NULL; dt_obj_version_t version; char *fname; - bool isblk, converted = false; + bool isblk = false, converted = false; int rc; ENTRY; -- 1.8.3.1