From: Felix Fietkau Date: Mon, 2 Jun 2014 09:38:18 +0000 (+0200) Subject: snapshot: add explicit cast to fix warning on x86_64 and switch to unsigned X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=d04e58946eff771bf59db90d7a2301b746141ac4;p=project%2Ffstools.git snapshot: add explicit cast to fix warning on x86_64 and switch to unsigned Signed-off-by: Felix Fietkau --- diff --git a/snapshot.c b/snapshot.c index a7952f3..fe1e537 100644 --- a/snapshot.c +++ b/snapshot.c @@ -150,7 +150,8 @@ snapshot_read(int argc, char **argv) if (argc > 2) { block = atoi(argv[2]); if (block >= (v->size / v->block_size)) { - fprintf(stderr, "invalid block %d > %" PRId64 "\n", block, v->size / v->block_size); + fprintf(stderr, "invalid block %d > %" PRIu64 "\n", + block, (uint64_t) v->size / v->block_size); goto out; } snprintf(file, sizeof(file), "/tmp/snapshot/block%d.tar.gz", block); @@ -178,7 +179,8 @@ snapshot_info(void) if (!v) return -1; - fprintf(stderr, "sectors:\t%" PRId64 ", block_size:\t%dK\n", v->size / v->block_size, v->block_size / 1024); + fprintf(stderr, "sectors:\t%" PRIu64 ", block_size:\t%dK\n", + (uint64_t) v->size / v->block_size, v->block_size / 1024); do { if (volume_read(v, &hdr, block * v->block_size, sizeof(struct file_header))) { fprintf(stderr, "scanning for next free block failed\n");