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/plugin.h | |
| parent | 1329d7d3fde426a290c03ee92b1c701dde49851c (diff) | |
| download | rockbox-79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d.zip rockbox-79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d.tar.gz rockbox-79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d.tar.bz2 rockbox-79c8a8cbbec5f1f0f7766d2b72ce12d51b3b849d.tar.xz | |
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/plugin.h')
| -rw-r--r-- | apps/plugin.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index c0e04a2..e3c086e 100644 --- a/apps/plugin.h +++ b/apps/plugin.h @@ -205,7 +205,7 @@ struct plugin_api { void (*backlight_on)(void); void (*backlight_off)(void); void (*backlight_set_timeout)(int index); - void (*splash)(int ticks, const unsigned char *fmt, ...); + void (*splash)(int ticks, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); #ifdef HAVE_REMOTE_LCD /* remote lcd */ @@ -296,7 +296,7 @@ struct plugin_api { int (*PREFIX(rename))(const char* path, const char* newname); int (*PREFIX(ftruncate))(int fd, off_t length); off_t (*PREFIX(filesize))(int fd); - int (*fdprintf)(int fd, const char *fmt, ...); + int (*fdprintf)(int fd, const char *fmt, ...) ATTRIBUTE_PRINTF(2, 3); int (*read_line)(int fd, char* buffer, int buffer_size); bool (*settings_parseline)(char* line, char** name, char** value); #ifndef SIMULATOR @@ -369,7 +369,8 @@ struct plugin_api { #endif /* strings and memory */ - int (*snprintf)(char *buf, size_t size, const char *fmt, ...); + int (*snprintf)(char *buf, size_t size, const char *fmt, ...) + ATTRIBUTE_PRINTF(3, 4); int (*vsnprintf)(char *buf, int size, const char *fmt, va_list ap); char* (*strcpy)(char *dst, const char *src); char* (*strncpy)(char *dst, const char *src, size_t length); @@ -519,10 +520,10 @@ struct plugin_api { void* (*plugin_get_audio_buffer)(int* buffer_size); void (*plugin_tsr)(bool (*exit_callback)(bool reenter)); #if defined(DEBUG) || defined(SIMULATOR) - void (*debugf)(const char *fmt, ...); + void (*debugf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2); #endif #ifdef ROCKBOX_HAS_LOGF - void (*logf)(const char *fmt, ...); + void (*logf)(const char *fmt, ...) ATTRIBUTE_PRINTF(1, 2); #endif struct user_settings* global_settings; bool (*mp3info)(struct mp3entry *entry, const char *filename, bool v1first); |