diff --git a/CONTRIBUTORS b/CONTRIBUTORS index 5e64f427..f615007f 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -1343,6 +1343,7 @@ Darren Salt pages for a patch that was used to add the command line options '--lirc', '--rcu' and '--no-kbd' + for adding '__attribute__' to functions that use printf() like parameters Sean Carlos for translating OSD texts to the Italian language diff --git a/HISTORY b/HISTORY index fe0f4499..99ffa4d9 100644 --- a/HISTORY +++ b/HISTORY @@ -3895,3 +3895,5 @@ Video Disk Recorder Revision History Setup.MenuScrollWrap is true (thanks to Enrico Scholz). - Making sure no item is displayed as "current" if Up, Down, Left or Right is pressed in a menu with no selectable items. +- Added '__attribute__' to functions that use printf() like parameters (thanks + to Darren Salt). diff --git a/svdrp.h b/svdrp.h index baa4fb33..9275bf27 100644 --- a/svdrp.h +++ b/svdrp.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: svdrp.h 1.23 2005/08/28 14:10:32 kls Exp $ + * $Id: svdrp.h 1.24 2005/10/09 11:11:59 kls Exp $ */ #ifndef __SVDRP_H @@ -51,7 +51,7 @@ private: time_t lastActivity; void Close(bool Timeout = false); bool Send(const char *s, int length = -1); - void Reply(int Code, const char *fmt, ...); + void Reply(int Code, const char *fmt, ...) __attribute__ ((format (printf, 3, 4))); void PrintHelpTopics(const char **hp); void CmdCHAN(const char *Option); void CmdCLRE(const char *Option); diff --git a/thread.h b/thread.h index 4eb09a10..e72677f3 100644 --- a/thread.h +++ b/thread.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: thread.h 1.30 2005/08/14 11:21:48 kls Exp $ + * $Id: thread.h 1.31 2005/10/09 11:12:32 kls Exp $ */ #ifndef __THREAD_H @@ -106,7 +106,7 @@ public: ///< the thread starts and stops. The Start() function must be called ///< to actually start the thread. virtual ~cThread(); - void SetDescription(const char *Description, ...); + void SetDescription(const char *Description, ...) __attribute__ ((format (printf, 2, 3))); bool Start(void); ///< Actually starts the thread. bool Active(void); diff --git a/tools.h b/tools.h index 97f42626..83bdeb41 100644 --- a/tools.h +++ b/tools.h @@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: tools.h 1.79 2005/10/01 12:43:31 kls Exp $ + * $Id: tools.h 1.80 2005/10/09 11:13:06 kls Exp $ */ #ifndef __TOOLS_H @@ -81,7 +81,7 @@ public: operator const char * () const { return s; } // for use in (const char *) context const char * operator*() const { return s; } // for use in (const void *) context (printf() etc.) cString &operator=(const cString &String); - static cString sprintf(const char *fmt, ...); + static cString sprintf(const char *fmt, ...) __attribute__ ((format (printf, 1, 2))); }; ssize_t safe_read(int filedes, void *buffer, size_t size);