# HG changeset patch # User Mark Doliner # Date 1205699723 0 # Node ID 9511acb88e58b23f09c7c360d2656915d8bfd20b # Parent 7a815907ba5ad3cfec02edc7b6e52739ea53235a Set G_GNUC_PRINTF(2, 3) on our debug functions. This sets the 'format' function attribute, which causes the compiler to print a warning if we pass incorrect parameters based on the format string. diff -r 7a815907ba5a -r 9511acb88e58 libpurple/debug.h --- a/libpurple/debug.h Sat Mar 15 19:41:30 2008 +0000 +++ b/libpurple/debug.h Sun Mar 16 20:35:23 2008 +0000 @@ -74,7 +74,7 @@ * @param format The format string. */ void purple_debug(PurpleDebugLevel level, const char *category, - const char *format, ...); + const char *format, ...) G_GNUC_PRINTF(3, 4); /** * Outputs misc. level debug information. @@ -87,7 +87,7 @@ * * @see purple_debug() */ -void purple_debug_misc(const char *category, const char *format, ...); +void purple_debug_misc(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); /** * Outputs info level debug information. @@ -100,7 +100,7 @@ * * @see purple_debug() */ -void purple_debug_info(const char *category, const char *format, ...); +void purple_debug_info(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); /** * Outputs warning level debug information. @@ -113,7 +113,7 @@ * * @see purple_debug() */ -void purple_debug_warning(const char *category, const char *format, ...); +void purple_debug_warning(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); /** * Outputs error level debug information. @@ -126,7 +126,7 @@ * * @see purple_debug() */ -void purple_debug_error(const char *category, const char *format, ...); +void purple_debug_error(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); /** * Outputs fatal error level debug information. @@ -139,7 +139,7 @@ * * @see purple_debug() */ -void purple_debug_fatal(const char *category, const char *format, ...); +void purple_debug_fatal(const char *category, const char *format, ...) G_GNUC_PRINTF(2, 3); /** * Enable or disable printing debug output to the console.