From a9ca7dd4d4b6dc55be46bbbdd166922c69a73590 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Tue, 23 May 2006 10:18:24 +0200 Subject: Added G_GNUC_PRINTF(...) to definitions of functions that take format strings so GCC can detect them and complain when things don't look right. --- ipc.h | 4 ++-- irc.h | 10 +++++----- log.h | 2 +- protocols/nogaim.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ipc.h b/ipc.h index 7ff74a15..db05d63c 100644 --- a/ipc.h +++ b/ipc.h @@ -46,9 +46,9 @@ void ipc_master_free_one( struct bitlbee_child *child ); void ipc_master_free_all(); void ipc_to_master( char **cmd ); -void ipc_to_master_str( char *format, ... ); +void ipc_to_master_str( char *format, ... ) G_GNUC_PRINTF( 1, 2 ); void ipc_to_children( char **cmd ); -void ipc_to_children_str( char *format, ... ); +void ipc_to_children_str( char *format, ... ) G_GNUC_PRINTF( 1, 2 ); /* We need this function in inetd mode, so let's just make it non-static. */ void ipc_master_cmd_rehash( irc_t *data, char **cmd ); diff --git a/irc.h b/irc.h index 86721058..79faea0b 100644 --- a/irc.h +++ b/irc.h @@ -104,7 +104,7 @@ typedef struct irc extern GSList *irc_connection_list; irc_t *irc_new( int fd ); -void irc_abort( irc_t *irc, int immed, char *format, ... ); +void irc_abort( irc_t *irc, int immed, char *format, ... ) G_GNUC_PRINTF( 3, 4 ); void irc_free( irc_t *irc ); void irc_exec( irc_t *irc, char **cmd ); @@ -113,10 +113,10 @@ char **irc_parse_line( char *line ); char *irc_build_line( char **cmd ); void irc_vawrite( irc_t *irc, char *format, va_list params ); -void irc_write( irc_t *irc, char *format, ... ); -void irc_write_all( int now, char *format, ... ); -void irc_reply( irc_t *irc, int code, char *format, ... ); -G_MODULE_EXPORT int irc_usermsg( irc_t *irc, char *format, ... ); +void irc_write( irc_t *irc, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); +void irc_write_all( int now, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); +void irc_reply( irc_t *irc, int code, char *format, ... ) G_GNUC_PRINTF( 3, 4 ); +G_MODULE_EXPORT int irc_usermsg( irc_t *irc, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); char **irc_tokenize( char *buffer ); void irc_login( irc_t *irc ); diff --git a/log.h b/log.h index 6679121d..f574ae07 100644 --- a/log.h +++ b/log.h @@ -53,7 +53,7 @@ typedef struct log_t { void log_init(void); void log_link(int level, int output); -void log_message(int level, char *message, ...); +void log_message(int level, char *message, ...) G_GNUC_PRINTF( 2, 3 ); void log_error(char *functionname); #endif diff --git a/protocols/nogaim.h b/protocols/nogaim.h index 54a1835b..282a2455 100644 --- a/protocols/nogaim.h +++ b/protocols/nogaim.h @@ -214,7 +214,7 @@ G_MODULE_EXPORT void destroy_gaim_conn( struct gaim_connection *gc ); G_MODULE_EXPORT void set_login_progress( struct gaim_connection *gc, int step, char *msg ); G_MODULE_EXPORT void hide_login_progress( struct gaim_connection *gc, char *msg ); G_MODULE_EXPORT void hide_login_progress_error( struct gaim_connection *gc, char *msg ); -G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ); +G_MODULE_EXPORT void serv_got_crap( struct gaim_connection *gc, char *format, ... ) G_GNUC_PRINTF( 2, 3 ); G_MODULE_EXPORT void account_online( struct gaim_connection *gc ); G_MODULE_EXPORT void signoff( struct gaim_connection *gc ); -- cgit v1.2.3