From 9747580a05f87a01c9e5663e35febe9a979755cf Mon Sep 17 00:00:00 2001 From: !uv Date: Fri, 20 Aug 2004 12:30:34 +0000 Subject: [PATCH] Warning fixes: printf complains, so add a cast. (Logical change 1.508) --- ntfsprogs/ntfsclone.c | 8 +++++--- ntfsprogs/ntfsresize.c | 9 ++++++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 33967ed8..e5e847b5 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -723,7 +723,8 @@ static void walk_runs(struct ntfs_walk_cluster *walk) if (lcn < 0 || lcn_length < 0) err_exit("Corrupt runlist in inode %lld attr %x LCN " "%llx length %llx\n", ctx->ntfs_ino->mft_no, - le32_to_cpu (a->type), lcn, lcn_length); + (unsigned int)le32_to_cpu(a->type), lcn, + lcn_length); if (!wipe) dump_clusters(walk->image, rl + i); @@ -1007,7 +1008,7 @@ static void print_image_info(void) Printf("NTFS volume version: %d.%d\n", image_hdr.major_ver, image_hdr.minor_ver); Printf("Cluster size : %u bytes\n", - image_hdr.cluster_size); + (unsigned int)image_hdr.cluster_size); print_volume_size("Image volume size ", image_hdr.cluster_size * image_hdr.nr_clusters); @@ -1064,7 +1065,8 @@ static void mount_volume(unsigned long new_mntflag) "please try again (or see -f option).\n"); if (NTFS_MAX_CLUSTER_SIZE < vol->cluster_size) - err_exit("Cluster size %u is too large!\n", vol->cluster_size); + err_exit("Cluster size %u is too large!\n", + (unsigned int)vol->cluster_size); Printf("NTFS volume version: %d.%d\n", vol->major_ver, vol->minor_ver); if (ntfs_version_is_supported(vol)) diff --git a/ntfsprogs/ntfsresize.c b/ntfsprogs/ntfsresize.c index 8080dbd5..2b580e7f 100644 --- a/ntfsprogs/ntfsresize.c +++ b/ntfsprogs/ntfsresize.c @@ -772,7 +772,8 @@ static void build_lcn_usage_bitmap(ntfs_volume *vol, ntfsck_t *fsck) if (lcn < 0 || lcn_length <= 0) err_exit("Corrupt runlist in inode %lld attr %x LCN " "%llx length %llx\n", inode, - le32_to_cpu(a->type), lcn, lcn_length); + (unsigned int)le32_to_cpu(a->type), lcn, + lcn_length); for (j = 0; j < lcn_length; j++) { u64 k = (u64)lcn + j; @@ -1529,7 +1530,8 @@ static void relocate_attribute(ntfs_resize_t *resize) if (lcn < 0 || lcn_length <= 0) err_exit("Corrupt runlist in MTF %llu attr %x LCN " "%llx length %llx\n", resize->mref, - le32_to_cpu (a->type), lcn, lcn_length); + (unsigned int)le32_to_cpu(a->type), + lcn, lcn_length); relocate_run(resize, &rl, i); } @@ -2046,7 +2048,8 @@ static ntfs_volume *mount_volume(void) "please try again (or see -f option).\n"); if (NTFS_MAX_CLUSTER_SIZE < vol->cluster_size) - err_exit("Cluster size %u is too large!\n", vol->cluster_size); + err_exit("Cluster size %u is too large!\n", + (unsigned int)vol->cluster_size); printf("NTFS volume version: %d.%d\n", vol->major_ver, vol->minor_ver); if (ntfs_version_is_supported(vol))