aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mtdutils/mtdutils.c8
-rw-r--r--updater/install.c2
2 files changed, 5 insertions, 5 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!
}
diff --git a/updater/install.c b/updater/install.c
index 29644fb..bae8959 100644
--- a/updater/install.c
+++ b/updater/install.c
@@ -1042,7 +1042,7 @@ Value* FileGetPropFn(const char* name, State* state, int argc, Expr* argv[]) {
goto done;
}
- if (fread(buffer, 1, st.st_size, f) != st.st_size) {
+ if (fread(buffer, 1, st.st_size, f) != (size_t)st.st_size) {
ErrorAbort(state, "%s: failed to read %lld bytes from %s",
name, (long long)st.st_size+1, filename);
fclose(f);