Suppress some compiler warnings due to signedness.
Change-Id: I63f28b3b4ba4185c23b972fc8f93517295b1672a
This commit is contained in:
parent
3317d50179
commit
5701d5829d
2 changed files with 5 additions and 5 deletions
|
@ -300,20 +300,20 @@ static int read_block(const MtdPartition *partition, int fd, char *data)
|
||||||
if (TEMP_FAILURE_RETRY(lseek64(fd, pos, SEEK_SET)) != pos ||
|
if (TEMP_FAILURE_RETRY(lseek64(fd, pos, SEEK_SET)) != pos ||
|
||||||
TEMP_FAILURE_RETRY(read(fd, data, size)) != size) {
|
TEMP_FAILURE_RETRY(read(fd, data, size)) != size) {
|
||||||
printf("mtd: read error at 0x%08llx (%s)\n",
|
printf("mtd: read error at 0x%08llx (%s)\n",
|
||||||
pos, strerror(errno));
|
(long long)pos, strerror(errno));
|
||||||
} else if (ioctl(fd, ECCGETSTATS, &after)) {
|
} else if (ioctl(fd, ECCGETSTATS, &after)) {
|
||||||
printf("mtd: ECCGETSTATS error (%s)\n", strerror(errno));
|
printf("mtd: ECCGETSTATS error (%s)\n", strerror(errno));
|
||||||
return -1;
|
return -1;
|
||||||
} else if (after.failed != before.failed) {
|
} else if (after.failed != before.failed) {
|
||||||
printf("mtd: ECC errors (%d soft, %d hard) at 0x%08llx\n",
|
printf("mtd: ECC errors (%d soft, %d hard) at 0x%08llx\n",
|
||||||
after.corrected - before.corrected,
|
after.corrected - before.corrected,
|
||||||
after.failed - before.failed, pos);
|
after.failed - before.failed, (long long)pos);
|
||||||
// copy the comparison baseline for the next read.
|
// copy the comparison baseline for the next read.
|
||||||
memcpy(&before, &after, sizeof(struct mtd_ecc_stats));
|
memcpy(&before, &after, sizeof(struct mtd_ecc_stats));
|
||||||
} else if ((mgbb = ioctl(fd, MEMGETBADBLOCK, &pos))) {
|
} else if ((mgbb = ioctl(fd, MEMGETBADBLOCK, &pos))) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"mtd: MEMGETBADBLOCK returned %d at 0x%08llx: %s\n",
|
"mtd: MEMGETBADBLOCK returned %d at 0x%08llx: %s\n",
|
||||||
mgbb, pos, strerror(errno));
|
mgbb, (long long)pos, strerror(errno));
|
||||||
} else {
|
} else {
|
||||||
return 0; // Success!
|
return 0; // Success!
|
||||||
}
|
}
|
||||||
|
|
|
@ -990,7 +990,7 @@ Value* FileGetPropFn(const char* name, State* state, int argc, Expr* argv[]) {
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fread(buffer, 1, st.st_size, f) != st.st_size) {
|
if (fread(buffer, 1, st.st_size, f) != static_cast<size_t>(st.st_size)) {
|
||||||
ErrorAbort(state, "%s: failed to read %lld bytes from %s",
|
ErrorAbort(state, "%s: failed to read %lld bytes from %s",
|
||||||
name, (long long)st.st_size+1, filename);
|
name, (long long)st.st_size+1, filename);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
|
Loading…
Reference in a new issue