summaryrefslogtreecommitdiffstats
path: root/mtdutils
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2015-09-24 10:56:48 -0700
committerSteve Kondik <steve@cyngn.com>2015-11-07 19:21:20 -0800
commitac61bb9852d7e06c0dc3a00eb6d56b03267527d9 (patch)
tree98174de42df11980b27edfbd305f7aecc223ef0f /mtdutils
parentf17456d480d102e941c6dbd3eb29a2185c4c0811 (diff)
downloadbootable_recovery-ac61bb9852d7e06c0dc3a00eb6d56b03267527d9.zip
bootable_recovery-ac61bb9852d7e06c0dc3a00eb6d56b03267527d9.tar.gz
bootable_recovery-ac61bb9852d7e06c0dc3a00eb6d56b03267527d9.tar.bz2
Suppress some compiler warnings due to signedness.
Change-Id: I63f28b3b4ba4185c23b972fc8f93517295b1672a
Diffstat (limited to 'mtdutils')
-rw-r--r--mtdutils/mtdutils.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mtdutils/mtdutils.c b/mtdutils/mtdutils.c
index 2f57aee..ed74d0f 100644
--- a/mtdutils/mtdutils.c
+++ b/mtdutils/mtdutils.c
@@ -306,20 +306,20 @@ static int read_block(const MtdPartition *partition, int fd, char *data)
if (TEMP_FAILURE_RETRY(lseek64(fd, pos, SEEK_SET)) != pos ||
TEMP_FAILURE_RETRY(read(fd, data, size)) != size) {
printf("mtd: read error at 0x%08llx (%s)\n",
- pos, strerror(errno));
+ (long long)pos, strerror(errno));
} else if (ioctl(fd, ECCGETSTATS, &after)) {
printf("mtd: ECCGETSTATS error (%s)\n", strerror(errno));
return -1;
} else if (after.failed != before.failed) {
printf("mtd: ECC errors (%d soft, %d hard) at 0x%08llx\n",
- after.corrected - before.corrected,
- after.failed - before.failed, pos);
+ after.corrected - before.corrected,
+ after.failed - before.failed, (long long)pos);
// copy the comparison baseline for the next read.
memcpy(&before, &after, sizeof(struct mtd_ecc_stats));
} else if ((mgbb = ioctl(fd, MEMGETBADBLOCK, &pos))) {
fprintf(stderr,
"mtd: MEMGETBADBLOCK returned %d at 0x%08llx: %s\n",
- mgbb, pos, strerror(errno));
+ mgbb, (long long)pos, strerror(errno));
} else {
return 0; // Success!
}