From 4cef6d8399ee510f62c6eed9682d58ed72d60965 Mon Sep 17 00:00:00 2001 From: yangsheng Date: Thu, 8 Jan 2009 06:26:53 +0000 Subject: [PATCH] Branch b1_8 b=17968 i=yangsheng, deen Fixed various compiler warnings on ppc/ppc64 sles9. Author: Jim Garlick(LLNL) --- lustre/include/obd_support.h | 2 +- lustre/llite/rw.c | 2 +- lustre/lvfs/fsfilt_ext3.c | 2 +- lustre/mdc/mdc_locks.c | 2 +- lustre/obdfilter/filter_lvb.c | 4 ++-- lustre/quota/quota_context.c | 2 +- lustre/quota/quota_internal.h | 5 +++-- lustre/utils/ll_recover_lost_found_objs.c | 2 +- lustre/utils/llog_reader.c | 2 +- lustre/utils/llverfs.c | 4 ++-- 10 files changed, 14 insertions(+), 13 deletions(-) diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index 5b68b0a..224034d 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -579,7 +579,7 @@ do { \ #ifdef HAVE_RCU # ifdef HAVE_CALL_RCU_PARAM -# define my_call_rcu(rcu, cb) call_rcu(rcu, cb, rcu) +# define my_call_rcu(rcu, cb) call_rcu(rcu, (void (*) (void *))(cb), rcu) # else # define my_call_rcu(rcu, cb) call_rcu(rcu, cb) # endif diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c index a7952b2..8449fc4 100644 --- a/lustre/llite/rw.c +++ b/lustre/llite/rw.c @@ -2255,7 +2255,7 @@ static int ll_file_oig_pages(struct inode * inode, struct page **pages, LL_CDEBUG_PAGE(D_PAGE, pages[i], "offset "LPU64"," " from %u, bytes = %u\n", - pos, from, bytes); + (__u64)pos, from, bytes); LASSERTF(pos >> CFS_PAGE_SHIFT == pages[i]->index, "wrong page index %lu (%lu)\n", pages[i]->index, diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 43b3f0c..4554eb6 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1300,7 +1300,7 @@ out: static int fsfilt_ext3_setup(struct super_block *sb) { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)) && defined(HAVE_QUOTA_SUPPORT) +#if !defined(S_PDIROPS) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)) && defined(HAVE_QUOTA_SUPPORT) struct ext3_sb_info *sbi = EXT3_SB(sb); #endif #if 0 diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index cd0b5fc..605ec48 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -277,7 +277,7 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, bufcount, size); if (rc & (rc - 1)) size[bufcount - 1] = min(size[bufcount - 1] + round_up(rc) - rc, - obddev->u.cli.cl_max_mds_easize); + (__u32)obddev->u.cli.cl_max_mds_easize); /* If inode is known, cancel conflicting OPEN locks. */ if (data->fid2.id) { diff --git a/lustre/obdfilter/filter_lvb.c b/lustre/obdfilter/filter_lvb.c index 06c718c..8a18a7e 100644 --- a/lustre/obdfilter/filter_lvb.c +++ b/lustre/obdfilter/filter_lvb.c @@ -213,8 +213,8 @@ static int filter_lvbo_update(struct ldlm_resource *res, struct ptlrpc_request * } if (lvb->lvb_blocks != dentry->d_inode->i_blocks) { CDEBUG(D_DLMTRACE,"res: "LPU64" updating lvb blocks from disk: " - LPU64" -> %lu\n", res->lr_name.name[0], - lvb->lvb_blocks, dentry->d_inode->i_blocks); + LPU64" -> "LPU64"\n", res->lr_name.name[0], + lvb->lvb_blocks, (__u64)dentry->d_inode->i_blocks); lvb->lvb_blocks = dentry->d_inode->i_blocks; } diff --git a/lustre/quota/quota_context.c b/lustre/quota/quota_context.c index 2091b87..1d53954 100644 --- a/lustre/quota/quota_context.c +++ b/lustre/quota/quota_context.c @@ -340,7 +340,7 @@ check_cur_qunit(struct obd_device *obd, ", pending_write: "LPU64", record: "LPD64 ", qunit_sz: %lu, tune_sz: %lu, ret: %d.\n", QDATA_IS_BLK(qdata) ? 'b' : 'i', limit, usage, pending_write, - record, qunit_sz, tune_sz, ret); + (__s64)record, qunit_sz, tune_sz, ret); LASSERT(ret == 0 || qdata->qd_count); spin_unlock(&lqs->lqs_lock); diff --git a/lustre/quota/quota_internal.h b/lustre/quota/quota_internal.h index c1c4baa..b4a7acc 100644 --- a/lustre/quota/quota_internal.h +++ b/lustre/quota/quota_internal.h @@ -93,8 +93,9 @@ LQS_IS_GRP(lqs) ? 'g' : 'u', \ lqs->lqs_bunit_sz, lqs->lqs_btune_sz, lqs->lqs_iunit_sz, \ lqs->lqs_itune_sz, lqs->lqs_bwrite_pending, \ - lqs->lqs_iwrite_pending, lqs->lqs_ino_rec, \ - lqs->lqs_blk_rec, atomic_read(&lqs->lqs_refcount), ## arg); + lqs->lqs_iwrite_pending, (__s64)lqs->lqs_ino_rec, \ + (__s64)lqs->lqs_blk_rec, atomic_read(&lqs->lqs_refcount), \ + ## arg); /* quota_context.c */ diff --git a/lustre/utils/ll_recover_lost_found_objs.c b/lustre/utils/ll_recover_lost_found_objs.c index 449cfae5..85f1e1d 100644 --- a/lustre/utils/ll_recover_lost_found_objs.c +++ b/lustre/utils/ll_recover_lost_found_objs.c @@ -401,7 +401,7 @@ int main(int argc, char **argv) struct stat stat_buf; char tmp_path[PATH_MAX]; char mount_path[PATH_MAX] = {0}; - char c; + int c; int retval; progname = argv[0]; diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c index 524daa8..c950c8d 100644 --- a/lustre/utils/llog_reader.c +++ b/lustre/utils/llog_reader.c @@ -238,7 +238,7 @@ static void print_1_cfg(struct lustre_cfg *lcfg) if (lcfg->lcfg_nid) printf("nid=%s("LPX64") ", libcfs_nid2str(lcfg->lcfg_nid), - lcfg->lcfg_nid); + (__u64)lcfg->lcfg_nid); if (lcfg->lcfg_nal) printf("nal=%d ", lcfg->lcfg_nal); for (i = 0; i < lcfg->lcfg_bufcount; i++) diff --git a/lustre/utils/llverfs.c b/lustre/utils/llverfs.c index 613d1b8..4863d86 100644 --- a/lustre/utils/llverfs.c +++ b/lustre/utils/llverfs.c @@ -498,10 +498,10 @@ int main(int argc, char **argv) FILE *countfile = NULL; char filecount[PATH_MAX]; unsigned long dir_num = 0, dir_num_orig = 0;/* starting directory */ - char c; + int c; progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/') + 1 : argv[0]; - while ((c = (char)getopt_long(argc, argv, "t:rwvplo:h", + while ((c = getopt_long(argc, argv, "t:rwvplo:h", longopts, NULL)) != -1) { switch (c) { case 'c': -- 1.8.3.1