Get rid of remaining build warnings in xfsprogs.
This builds cleanly on ia64 and x86_64, and builds without any
printf() format-related warnings on i386.
[Moved a few warning fixes from this to the previous patch. -Alex]
Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
if (sts != 0) {
fprintf(stderr,
_("inode-path for inode: %llu is incorrect - path \"%s\" non-existent\n"),
- bstatp->bs_ino, fullpath);
+ (unsigned long long) bstatp->bs_ino, fullpath);
if (verbose_flag) {
fprintf(stderr,
_("path \"%s\" does not stat for inode: %llu; err = %s\n"),
fullpath,
- bstatp->bs_ino,
+ (unsigned long long) bstatp->bs_ino,
strerror(errno));
}
err_status++;
if (statbuf.st_ino != bstatp->bs_ino) {
fprintf(stderr,
_("inode-path for inode: %llu is incorrect - wrong inode#\n"),
- bstatp->bs_ino);
+ (unsigned long long) bstatp->bs_ino);
if (verbose_flag) {
fprintf(stderr,
_("ino mismatch for path \"%s\" %llu vs %llu\n"),
if (parent->p_ino != statbuf.st_ino) {
fprintf(stderr,
_("inode-path for inode: %llu is incorrect - wrong parent inode#\n"),
- bstatp->bs_ino);
+ (unsigned long long) bstatp->bs_ino);
if (verbose_flag) {
fprintf(stderr,
_("ino mismatch for path \"%s\" %llu vs %llu\n"),
return;
} else {
if (verbose_flag > 1) {
- printf(_("parent ino match for %llu\n"), parent->p_ino);
+ printf(_("parent ino match for %llu\n"),
+ (unsigned long long) parent->p_ino);
}
}
}
parentbuf = (parent_t *)realloc(parentbuf, *parentbuf_size);
} else if (error) {
fprintf(stderr, _("parentpaths failed for ino %llu: %s\n"),
- statp->bs_ino,
+ (unsigned long long) statp->bs_ino,
strerror(errno));
err_status++;
break;
if (count == 0) {
/* no links for inode - something wrong here */
- fprintf(stderr, _("inode-path for inode: %llu is missing\n"), statp->bs_ino);
+ fprintf(stderr, _("inode-path for inode: %llu is missing\n"),
+ (unsigned long long) statp->bs_ino);
err_status++;
}
if (xfsctl(mntpt, fsfd, XFS_IOC_FSBULKSTAT_SINGLE, &bulkreq) < 0) {
fprintf(stderr,
_("failed to get bulkstat information for inode %llu\n"),
- p->bs_ino );
+ (unsigned long long) p->bs_ino);
continue;
}
if (!p->bs_nlink || !p->bs_mode || !p->bs_ino) {
fprintf(stderr,
_("failed to get valid bulkstat information for inode %llu\n"),
- p->bs_ino );
+ (unsigned long long) p->bs_ino);
continue;
}
}
}
if (verbose_flag > 1) {
- printf(_("checking inode %llu\n"), p->bs_ino);
+ printf(_("checking inode %llu\n"),
+ (unsigned long long) p->bs_ino);
}
/* print dotted progress */
if (err_status > 0)
fprintf(stderr, _("num errors: %d\n"), err_status);
else
- printf(_("succeeded checking %llu inodes\n"), inodes_checked);
+ printf(_("succeeded checking %llu inodes\n"),
+ (unsigned long long) inodes_checked);
free(bstatbuf);
free(parentbuf);
static void
print_parent_entry(parent_t *parent, int fullpath)
{
- printf(_("p_ino = %llu\n"), parent->p_ino);
+ printf(_("p_ino = %llu\n"), (unsigned long long) parent->p_ino);
printf(_("p_gen = %u\n"), parent->p_gen);
printf(_("p_reclen = %u\n"), parent->p_reclen);
if (fullpath)
*/
memmove(&x, *ptr, sizeof(__be64));
memmove(&y, *ptr+8, sizeof(__be64));
- printf(_("icount: %lld ifree: %lld "),
- be64_to_cpu(x), be64_to_cpu(y));
+ printf(_("icount: %llu ifree: %llu "),
+ (unsigned long long) be64_to_cpu(x),
+ (unsigned long long) be64_to_cpu(y));
memmove(&x, *ptr+16, sizeof(__be64));
memmove(&y, *ptr+24, sizeof(__be64));
- printf(_("fdblks: %lld frext: %lld\n"),
- be64_to_cpu(x), be64_to_cpu(y));
+ printf(_("fdblks: %llu frext: %llu\n"),
+ (unsigned long long) be64_to_cpu(x),
+ (unsigned long long) be64_to_cpu(y));
}
super_block = 0;
} else if (be32_to_cpu(*(__be32 *)(*ptr)) == XFS_AGI_MAGIC) {
dq->d_version, dq->d_flags,
be32_to_cpu(dq->d_id));
printf(_("blk limits hard: %llu soft: %llu\n"),
- be64_to_cpu(dq->d_blk_hardlimit),
- be64_to_cpu(dq->d_blk_softlimit));
+ (unsigned long long)
+ be64_to_cpu(dq->d_blk_hardlimit),
+ (unsigned long long)
+ be64_to_cpu(dq->d_blk_softlimit));
printf(_("blk count: %llu warns: %d timer: %d\n"),
- be64_to_cpu(dq->d_bcount),
- be16_to_cpu(dq->d_bwarns),
+ (unsigned long long) be64_to_cpu(dq->d_bcount),
+ (int) be16_to_cpu(dq->d_bwarns),
be32_to_cpu(dq->d_btimer));
printf(_("ino limits hard: %llu soft: %llu\n"),
- be64_to_cpu(dq->d_ino_hardlimit),
- be64_to_cpu(dq->d_ino_softlimit));
+ (unsigned long long)
+ be64_to_cpu(dq->d_ino_hardlimit),
+ (unsigned long long)
+ be64_to_cpu(dq->d_ino_softlimit));
printf(_("ino count: %llu warns: %d timer: %d\n"),
- be64_to_cpu(dq->d_icount),
- be16_to_cpu(dq->d_iwarns),
+ (unsigned long long) be64_to_cpu(dq->d_icount),
+ (int) be16_to_cpu(dq->d_iwarns),
be32_to_cpu(dq->d_itimer));
}
} else {
printf(_("SHORTFORM DIRECTORY size %d count %d\n"),
size, sfp->hdr.count);
memmove(&ino, &(sfp->hdr.parent), sizeof(ino));
- printf(_(".. ino 0x%llx\n"), be64_to_cpu(*(__be64 *)&ino));
+ printf(_(".. ino 0x%llx\n"), (unsigned long long) be64_to_cpu(ino));
count = (uint)(sfp->hdr.count);
sfep = &(sfp->list[0]);
printf(_(" SUPER Block Buffer:\n"));
if (!print_buffer)
continue;
- printf(_(" icount:%Ld ifree:%Ld "),
- be64_to_cpu(*(__be64 *)(p)),
- be64_to_cpu(*(__be64 *)(p+8)));
- printf(_("fdblks:%Ld frext:%Ld\n"),
- be64_to_cpu(*(__be64 *)(p+16)),
- be64_to_cpu(*(__be64 *)(p+24)));
+ printf(_(" icount:%llu ifree:%llu "),
+ (unsigned long long)
+ be64_to_cpu(*(__be64 *)(p)),
+ (unsigned long long)
+ be64_to_cpu(*(__be64 *)(p+8)));
+ printf(_("fdblks:%llu frext:%llu\n"),
+ (unsigned long long)
+ be64_to_cpu(*(__be64 *)(p+16)),
+ (unsigned long long)
+ be64_to_cpu(*(__be64 *)(p+24)));
printf(_(" sunit:%u swidth:%u\n"),
be32_to_cpu(*(__be32 *)(p+56)),
be32_to_cpu(*(__be32 *)(p+60)));