From 43280fed0324d21d66fb8c4473c6178c46cc14c2 Mon Sep 17 00:00:00 2001 From: "cantab.net!aia21" Date: Tue, 9 Mar 2004 14:47:34 +0000 Subject: [PATCH] Auto merged 2004/03/09 14:38:50+00:00 cantab.net!aia21 Fix all occurences of printf with %ll length modifiers but 64 bit arguments to typecast the arguments to (unsigned) long long to avoid the warnings when compiling on 64 bit architectures. (Logical change 1.306) --- ntfsprogs/ntfsclone.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/ntfsprogs/ntfsclone.c b/ntfsprogs/ntfsclone.c index 4793762b..8d0f8adc 100644 --- a/ntfsprogs/ntfsclone.c +++ b/ntfsprogs/ntfsclone.c @@ -637,9 +637,11 @@ static void compare_bitmaps(struct bitmap *a) if (++mismatch > 10) continue; - Printf("Cluster accounting failed at %llu " - "(0x%llx): %s cluster in $Bitmap\n", - cl, cl, bit ? "missing" : "extra"); + Printf("Cluster accounting failed at %lld " + "(0x%llx): %s cluster in " + "$Bitmap\n", (long long)cl, + (unsigned long long)cl, + bit ? "missing" : "extra"); } } } @@ -817,8 +819,8 @@ static s64 volume_size(ntfs_volume *volume, s64 nr_clusters) static void print_volume_size(const char *str, s64 bytes) { - Printf("%s: %lld bytes (%lld MB)\n", - str, bytes, rounded_up_division(bytes, NTFS_MBYTE)); + Printf("%s: %lld bytes (%lld MB)\n", str, (long long)bytes, + (long long)rounded_up_division(bytes, NTFS_MBYTE)); } @@ -830,8 +832,8 @@ static void print_disk_usage(ntfs_walk_clusters_ctx *image) used = image->inuse * vol->cluster_size; Printf("Space in use : %lld MB (%.1f%%) ", - rounded_up_division(used, NTFS_MBYTE), - 100.0 * ((float)used / total)); + (long long)rounded_up_division(used, NTFS_MBYTE), + 100.0 * ((float)used / total)); Printf("\n"); } @@ -1058,7 +1060,8 @@ int main(int argc, char **argv) walk_clusters(vol, &backup_clusters); - Printf("Num of MFT records = %8lld\n", vol->nr_mft_records); + Printf("Num of MFT records = %8lld\n", + (long long)vol->nr_mft_records); Printf("Num of used MFT records = %8d\n", nr_used_mft_records); Printf("Wiped unused MFT data = %8d\n", wiped_unused_mft_data);