forked from len0rd/rockbox
fix warnings on some systems / format specifier mismatch
Instead of %ld or %lx, use %jd or %jx for off_t (after casting to intmax_t) Change-Id: I4cd1831816820d2862b383ff8782e548b2fca294
This commit is contained in:
parent
93ecb97693
commit
87452d775e
6 changed files with 70 additions and 60 deletions
|
@ -393,7 +393,8 @@ static void save_bookmark(const char *fname, int wpm)
|
|||
}
|
||||
rb->close(bookmark_fd);
|
||||
}
|
||||
rb->fdprintf(tmp_fd, "%ld %d %d %s\n", line_offs, word_num, wpm, fname);
|
||||
rb->fdprintf(tmp_fd, "%jd %d %d %s\n",
|
||||
(intmax_t) line_offs, word_num, wpm, fname);
|
||||
rb->close(tmp_fd);
|
||||
rb->rename(BOOKMARK_FILE ".tmp", BOOKMARK_FILE);
|
||||
}
|
||||
|
@ -585,7 +586,8 @@ static int poll_input(int *wpm, long *clear, const char *fname, off_t file_size)
|
|||
offs += 99 * SEEK_INTERVAL;
|
||||
else if(offs >= 10 * SEEK_INTERVAL)
|
||||
offs += 9 * SEEK_INTERVAL;
|
||||
rb->splashf(0, "%ld/%ld bytes", offs + base_offs, file_size);
|
||||
rb->splashf(0, "%jd/%jd bytes",
|
||||
(intmax_t) (offs + base_offs), (intmax_t) file_size);
|
||||
rb->sleep(HZ/20);
|
||||
} while(get_useraction() == FFWD && offs + base_offs < file_size && offs + base_offs >= 0);
|
||||
|
||||
|
@ -614,7 +616,8 @@ static int poll_input(int *wpm, long *clear, const char *fname, off_t file_size)
|
|||
offs -= 99 * SEEK_INTERVAL;
|
||||
else if(offs <= -10 * SEEK_INTERVAL)
|
||||
offs -= 9 * SEEK_INTERVAL;
|
||||
rb->splashf(0, "%ld/%ld bytes", offs + base_offs, file_size);
|
||||
rb->splashf(0, "%jd/%jd bytes",
|
||||
(intmax_t) (offs + base_offs), (intmax_t) file_size);
|
||||
rb->sleep(HZ/20);
|
||||
} while(get_useraction() == FFWD && offs + base_offs < file_size && offs + base_offs >= 0);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue