mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-30 10:26:58 +01:00
Add __attribute__ ((format)) and fix problem it flags.
This commit is contained in:
parent
559700e27b
commit
bc873169f1
2 changed files with 4 additions and 3 deletions
|
@ -248,8 +248,8 @@ linux_udp_send( const XP_U8* buf, XP_U16 buflen, const CommsAddrRec* addrp,
|
|||
}
|
||||
|
||||
if ( haveAddress ) {
|
||||
XP_LOGF( "calling sendto: sock=%d; port=%d; ipaddr=%lx", stuff->socket,
|
||||
ntohs(to.sin_port), to.sin_addr.s_addr );
|
||||
XP_LOGF( "calling sendto: sock=%d; port=%d; ipaddr=%x",
|
||||
stuff->socket, ntohs(to.sin_port), to.sin_addr.s_addr );
|
||||
nSent = sendto( stuff->socket, buf, buflen, 0,
|
||||
(struct sockaddr*)&to, sizeof(to) );
|
||||
if ( nSent != buflen ) {
|
||||
|
|
|
@ -61,7 +61,8 @@ typedef unsigned long XP_Time;
|
|||
#define XP_LOGF XP_DEBUGF
|
||||
|
||||
#ifdef DEBUG
|
||||
extern void linux_debugf(char*, ...);
|
||||
extern void linux_debugf(const char*, ...)
|
||||
__attribute__ ((format (printf, 1, 2)));
|
||||
#define XP_DEBUGF(...) linux_debugf(__VA_ARGS__)
|
||||
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue