Mercurial > hg > freeDiameter
changeset 1025:afaeef21596b
Mark fd_log and fd_msg_log as printf-like functions, and fix a warning
found by that.
author | Thomas Klausner <tk@giga.or.at> |
---|---|
date | Sat, 13 Apr 2013 16:26:09 +0200 |
parents | 5e1f74f103cc |
children | beb375690453 |
files | include/freeDiameter/libfdproto.h |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h Fri Apr 12 12:36:36 2013 +0800 +++ b/include/freeDiameter/libfdproto.h Sat Apr 13 16:26:09 2013 +0200 @@ -127,7 +127,7 @@ * RETURN VALUE: * None. */ -void fd_log ( int, const char *, ... ); +void fd_log ( int, const char *, ... ) __printflike(2, 3); #define fd_log_debug(format,args...) fd_log(FD_LOG_DEBUG, format, ## args) #define fd_log_notice(format,args...) fd_log(FD_LOG_NOTICE, format, ## args) #define fd_log_error(format,args...) fd_log(FD_LOG_ERROR, format, ## args) @@ -785,7 +785,7 @@ if (th_ret == PTHREAD_CANCELED) { TRACE_DEBUG(ANNOYING, "The thread %p was canceled", *th); } else { - TRACE_DEBUG(CALL, "The thread %p returned %x", *th, th_ret); + TRACE_DEBUG(CALL, "The thread %p returned %p", *th, th_ret); } /* Clean the location */ @@ -2336,7 +2336,7 @@ FD_MSG_LOG_TIMING /* profiling messages */ }; #define FD_MSG_LOG_MAX FD_MSG_LOG_TIMING -void fd_msg_log( enum fd_msg_log_cause cause, struct msg * msg, const char * prefix_format, ... ); +void fd_msg_log( enum fd_msg_log_cause cause, struct msg * msg, const char * prefix_format, ... ) __printflike(3, 4); /* configure the msg_log facility */ enum fd_msg_log_method {