diff options
author | Jens Arnold <amiconn@rockbox.org> | 2007-03-17 09:02:53 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2007-03-17 09:02:53 +0000 |
commit | 79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d (patch) | |
tree | d5c3fbab0ec01d2b0ca7d5278f15cf45f79b0763 /apps/codecs.h | |
parent | 1329d7d3fde426a290c03ee92b1c701dde49851c (diff) | |
download | rockbox-79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d.tar.gz rockbox-79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d.zip |
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
Diffstat (limited to 'apps/codecs.h')
-rw-r--r-- | apps/codecs.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/codecs.h b/apps/codecs.h index 7c7224ec80..5dfadcc29d 100644 --- a/apps/codecs.h +++ b/apps/codecs.h | |||
@@ -166,7 +166,7 @@ struct codec_api { | |||
166 | /* Configure different codec buffer parameters. */ | 166 | /* Configure different codec buffer parameters. */ |
167 | void (*configure)(int setting, intptr_t value); | 167 | void (*configure)(int setting, intptr_t value); |
168 | 168 | ||
169 | void (*splash)(int ticks, const unsigned char *fmt, ...); | 169 | void (*splash)(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); |
170 | 170 | ||
171 | /* file */ | 171 | /* file */ |
172 | int (*PREFIX(open))(const char* pathname, int flags); | 172 | int (*PREFIX(open))(const char* pathname, int flags); |
@@ -180,7 +180,7 @@ struct codec_api { | |||
180 | int (*PREFIX(ftruncate))(int fd, off_t length); | 180 | int (*PREFIX(ftruncate))(int fd, off_t length); |
181 | int (*PREFIX(fsync))(int fd); | 181 | int (*PREFIX(fsync))(int fd); |
182 | 182 | ||
183 | int (*fdprintf)(int fd, const char *fmt, ...); | 183 | int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); |
184 | int (*read_line)(int fd, char* buffer, int buffer_size); | 184 | int (*read_line)(int fd, char* buffer, int buffer_size); |
185 | bool (*settings_parseline)(char* line, char** name, char** value); | 185 | bool (*settings_parseline)(char* line, char** name, char** value); |
186 | #ifndef SIMULATOR | 186 | #ifndef SIMULATOR |
@@ -218,7 +218,8 @@ struct codec_api { | |||
218 | #endif | 218 | #endif |
219 | 219 | ||
220 | /* strings and memory */ | 220 | /* strings and memory */ |
221 | int (*snprintf)(char *buf, size_t size, const char *fmt, ...); | 221 | int (*snprintf)(char *buf, size_t size, const char *fmt, ...) |
222 | ATTRIBUTE_PRINTF(3, 4); | ||
222 | char* (*strcpy)(char *dst, const char *src); | 223 | char* (*strcpy)(char *dst, const char *src); |
223 | char* (*strncpy)(char *dst, const char *src, size_t length); | 224 | char* (*strncpy)(char *dst, const char *src, size_t length); |
224 | size_t (*strlen)(const char *str); | 225 | size_t (*strlen)(const char *str); |
@@ -278,10 +279,10 @@ struct codec_api { | |||
278 | bool signd); | 279 | bool signd); |
279 | 280 | ||
280 | #if defined(DEBUG) || defined(SIMULATOR) | 281 | #if defined(DEBUG) || defined(SIMULATOR) |
281 | void (*debugf)(const char *fmt, ...); | 282 | void (*debugf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2); |
282 | #endif | 283 | #endif |
283 | #ifdef ROCKBOX_HAS_LOGF | 284 | #ifdef ROCKBOX_HAS_LOGF |
284 | void (*logf)(const char *fmt, ...); | 285 | void (*logf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2); |
285 | #endif | 286 | #endif |
286 | struct user_settings* global_settings; | 287 | struct user_settings* global_settings; |
287 | bool (*mp3info)(struct mp3entry *entry, const char *filename, bool v1first); | 288 | bool (*mp3info)(struct mp3entry *entry, const char *filename, bool v1first); |