Changes by: uvman
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23854/ntfsprogs
Modified Files:
ntfsclone.c ntfscmp.c ntfsfix.c ntfsinfo.c ntfsresize.c
ntfsundelete.c
Log Message:
compiler warnings fixes.
Index: ntfsclone.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsclone.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -p -r1.53 -r1.54
--- ntfsclone.c 30 Sep 2005 20:29:58 -0000 1.53
+++ ntfsclone.c 4 Oct 2005 20:36:42 -0000 1.54
@@ -523,7 +523,7 @@ static void copy_cluster(int rescue, u64
for (i = 0; i < csize; i += NTFS_SECTOR_SIZE)
rescue_sector(fd, rescue_pos + i, buff + i);
} else {
- Printf(bad_sectors_warning_msg);
+ Printf("%s", bad_sectors_warning_msg);
err_exit("Disk is faulty, can't make full backup!");
}
}
Index: ntfscmp.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfscmp.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- ntfscmp.c 30 Sep 2005 19:24:13 -0000 1.4
+++ ntfscmp.c 4 Oct 2005 20:36:42 -0000 1.5
@@ -768,9 +768,9 @@ static ntfs_volume *mount_volume(const c
if (err == EINVAL)
printf(invalid_ntfs_msg, volume);
else if (err == EIO)
- printf(corrupt_volume_msg);
+ puts(corrupt_volume_msg);
else if (err == EPERM)
- printf(hibernated_volume_msg);
+ puts(hibernated_volume_msg);
exit(1);
}
Index: ntfsfix.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsfix.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -p -r1.17 -r1.18
--- ntfsfix.c 28 Sep 2005 13:47:48 -0000 1.17
+++ ntfsfix.c 4 Oct 2005 20:36:42 -0000 1.18
@@ -93,9 +93,9 @@ struct {
char *volume;
} opt;
+static int usage(void) __attribute__((noreturn));
static int usage(void)
{
-
printf("%s v%s\n"
"\n"
"Usage: %s [options] device\n"
Index: ntfsinfo.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsinfo.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -p -r1.76 -r1.77
--- ntfsinfo.c 28 Sep 2005 13:47:48 -0000 1.76
+++ ntfsinfo.c 4 Oct 2005 20:36:42 -0000 1.77
@@ -475,7 +475,7 @@ static void ntfs_dump_flags(ATTR_TYPES t
static void ntfs_dump_namespace(u8 file_name_type)
{
- const char *mbs_file_type = NULL;
+ const char *mbs_file_type;
/* name space */
switch (file_name_type) {
@@ -491,9 +491,9 @@ static void ntfs_dump_namespace(u8 file_
case FILE_NAME_WIN32_AND_DOS:
mbs_file_type = "Win32 & DOS";
break;
+ default:
+ mbs_file_type = "(unknown)";
}
- if (mbs_file_type == NULL) /* should never happen */
- mbs_file_type = "(unknown)";
printf("\tNamespace:\t\t %s\n", mbs_file_type);
}
@@ -982,7 +982,7 @@ static void ntfs_dump_attr_volume_inform
printf("\tAttribute instance:\t %u\n", le16_to_cpu(attr->instance));
- printf("\tVolume Version:\t %d.%d\n", vol_information->major_ver,
+ printf("\tVolume Version:\t\t %d.%d\n", vol_information->major_ver,
vol_information->minor_ver);
printf("\tFlags:\t\t\t ");
if (vol_information->flags & VOLUME_IS_DIRTY)
Index: ntfsresize.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsresize.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -p -r1.93 -r1.94
--- ntfsresize.c 30 Sep 2005 20:29:58 -0000 1.93
+++ ntfsresize.c 4 Oct 2005 20:36:42 -0000 1.94
@@ -821,7 +821,7 @@ static void build_lcn_usage_bitmap(ntfs_
int err = errno;
perr_printf("ntfs_decompress_mapping_pairs");
if (err == EIO)
- printf(corrupt_volume_msg);
+ puts(corrupt_volume_msg);
exit(1);
}
@@ -972,7 +972,7 @@ done:
if (mismatch) {
err_printf("Filesystem check failed! Totally %d cluster "
"accounting mismatches.\n", mismatch);
- printf(corrupt_volume_msg);
+ puts(corrupt_volume_msg);
exit(1);
}
}
@@ -2212,11 +2212,11 @@ static ntfs_volume *mount_volume(void)
if (err == EINVAL)
printf(invalid_ntfs_msg, opt.volume);
else if (err == EIO)
- printf(corrupt_volume_msg);
+ puts(corrupt_volume_msg);
else if (err == EPERM)
- printf(hibernated_volume_msg);
+ puts(hibernated_volume_msg);
else if (err == EOPNOTSUPP)
- printf(unclean_journal_msg);
+ puts(unclean_journal_msg);
exit(1);
}
@@ -2294,7 +2294,7 @@ static void check_resize_constraints(ntf
resize->badclusters,
resize->badclusters - 1 ? "s" : "");
if (!opt.badsectors) {
- printf(bad_sectors_warning_msg);
+ puts(bad_sectors_warning_msg);
exit(1);
}
}
@@ -2398,7 +2398,7 @@ int main(int argc, char **argv)
if (fsck.multi_ref)
err_printf("%d clusters are referenced multiply"
" times.\n", fsck.multi_ref);
- printf(corrupt_volume_msg);
+ puts(corrupt_volume_msg);
exit(1);
}
compare_bitmaps(vol, &fsck.lcn_bitmap);
@@ -2427,7 +2427,7 @@ int main(int argc, char **argv)
}
if (opt.force-- <= 0 && !opt.ro_flag) {
- printf(resize_warning_msg);
+ puts(resize_warning_msg);
proceed_question();
}
@@ -2456,7 +2456,7 @@ int main(int argc, char **argv)
printf("Successfully resized NTFS on device '%s'.\n", vol->dev->d_name);
if (resize.shrink)
- printf(resize_important_msg);
+ puts(resize_important_msg);
return 0;
}
Index: ntfsundelete.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfsundelete.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -p -r1.46 -r1.47
--- ntfsundelete.c 28 Sep 2005 13:47:48 -0000 1.46
+++ ntfsundelete.c 4 Oct 2005 20:36:42 -0000 1.47
@@ -1274,7 +1274,7 @@ static void dump_record (struct ufile *f
if (!(f->flags & (FILE_ATTR_SYSTEM | FILE_ATTR_DIRECTORY |
FILE_ATTR_SPARSE_FILE | FILE_ATTR_REPARSE_POINT |
FILE_ATTR_COMPRESSED | FILE_ATTR_ENCRYPTED))) {
- Qprintf (NONE);
+ Qprintf ("%s", NONE);
}
Qprintf ("\n");
|