forked from len0rd/rockbox
Let GCC check arguments of some more printf-style functions, also for plugins and codecs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12815 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
1329d7d3fd
commit
79c8a8cbbe
20 changed files with 55 additions and 49 deletions
|
|
@ -167,7 +167,7 @@ static void build_slot_path(char *buf, size_t bufsiz, size_t slot_id) {
|
|||
munge_name(name_buf, strlen(name_buf));
|
||||
|
||||
/* glom the whole mess together */
|
||||
snprintf(buf, bufsiz, "%s/%s-%d.rbs", STATE_DIR, name_buf, slot_id + 1);
|
||||
snprintf(buf, bufsiz, "%s/%s-%ld.rbs", STATE_DIR, name_buf, slot_id + 1);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
@ -263,17 +263,17 @@ static void slot_info(char *info_buf, size_t info_bufsiz, size_t slot_id) {
|
|||
if (read(fd, buf, 20) > 0)
|
||||
{
|
||||
buf[20] = '\0';
|
||||
snprintf(info_buf, info_bufsiz, "%d. %s", slot_id + 1, buf);
|
||||
snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, buf);
|
||||
}
|
||||
else
|
||||
snprintf(info_buf, info_bufsiz, "%d. ERROR", slot_id + 1);
|
||||
snprintf(info_buf, info_bufsiz, "%ld. ERROR", slot_id + 1);
|
||||
|
||||
close(fd);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* if we couldn't open the file, then the slot is empty */
|
||||
snprintf(info_buf, info_bufsiz, "%d. %s", slot_id + 1, "<Empty>");
|
||||
snprintf(info_buf, info_bufsiz, "%ld. %s", slot_id + 1, "<Empty>");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue