Whamcloud - gitweb
Branch b1_8
authoryangsheng <yangsheng>
Thu, 8 Jan 2009 06:26:53 +0000 (06:26 +0000)
committeryangsheng <yangsheng>
Thu, 8 Jan 2009 06:26:53 +0000 (06:26 +0000)
b=17968
i=yangsheng, deen

Fixed various compiler warnings on ppc/ppc64 sles9.

Author: Jim Garlick(LLNL)

lustre/include/obd_support.h
lustre/llite/rw.c
lustre/lvfs/fsfilt_ext3.c
lustre/mdc/mdc_locks.c
lustre/obdfilter/filter_lvb.c
lustre/quota/quota_context.c
lustre/quota/quota_internal.h
lustre/utils/ll_recover_lost_found_objs.c
lustre/utils/llog_reader.c
lustre/utils/llverfs.c

index 5b68b0a..224034d 100644 (file)
@@ -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
index a7952b2..8449fc4 100644 (file)
@@ -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,
index 43b3f0c..4554eb6 100644 (file)
@@ -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
index cd0b5fc..605ec48 100644 (file)
@@ -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) {
index 06c718c..8a18a7e 100644 (file)
@@ -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;
         }
 
index 2091b87..1d53954 100644 (file)
@@ -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);
index c1c4baa..b4a7acc 100644 (file)
@@ -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 */
index 449cfae..85f1e1d 100644 (file)
@@ -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];
index 524daa8..c950c8d 100644 (file)
@@ -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++)
index 613d1b8..4863d86 100644 (file)
@@ -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':