mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-14 08:01:38 +01:00
Fix errors, all in debug-only code, flagged by __attribute__ format addition.
This commit is contained in:
parent
1eb2933d49
commit
20ea57cf77
8 changed files with 11 additions and 9 deletions
|
@ -1131,7 +1131,7 @@ validateInitialMessage( CommsCtxt* comms, XP_Bool hasPayload,
|
||||||
rec = NULL;
|
rec = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LOG_RETURNF( "%lx", rec );
|
LOG_RETURNF( XP_P, rec );
|
||||||
return rec;
|
return rec;
|
||||||
#else
|
#else
|
||||||
AddressRecord* rec = getRecordFor( comms, addr, *channelNo );
|
AddressRecord* rec = getRecordFor( comms, addr, *channelNo );
|
||||||
|
@ -1171,7 +1171,7 @@ validateChannelMessage( CommsCtxt* comms, const CommsAddrRec* addr,
|
||||||
rec->lastACK = (XP_U16)lastMsgRcd;
|
rec->lastACK = (XP_U16)lastMsgRcd;
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
XP_LOGF( "%s: expected %d, got %d", __func__,
|
XP_LOGF( "%s: expected %ld, got %ld", __func__,
|
||||||
rec->lastMsgRcd + 1, msgID );
|
rec->lastMsgRcd + 1, msgID );
|
||||||
rec = NULL;
|
rec = NULL;
|
||||||
}
|
}
|
||||||
|
@ -1179,7 +1179,7 @@ validateChannelMessage( CommsCtxt* comms, const CommsAddrRec* addr,
|
||||||
XP_LOGF( "%s: no rec for addr", __func__ );
|
XP_LOGF( "%s: no rec for addr", __func__ );
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_RETURNF( "%lx", rec );
|
LOG_RETURNF( XP_P, rec );
|
||||||
return rec;
|
return rec;
|
||||||
} /* validateChannelMessage */
|
} /* validateChannelMessage */
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ mpool_destroy( MemPoolCtx* mpool )
|
||||||
MemPoolEntry* entry;
|
MemPoolEntry* entry;
|
||||||
for ( entry = mpool->usedList; !!entry; entry = entry->next ) {
|
for ( entry = mpool->usedList; !!entry; entry = entry->next ) {
|
||||||
#ifndef FOR_GREMLINS /* I don't want to hear about this right now */
|
#ifndef FOR_GREMLINS /* I don't want to hear about this right now */
|
||||||
XP_WARNF( "0x%lx from ln %ld of %s\n",
|
XP_WARNF( "0x" XP_P " from ln %ld of %s\n",
|
||||||
entry->ptr, entry->lineNo, entry->fileName );
|
entry->ptr, entry->lineNo, entry->fileName );
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
{
|
{
|
||||||
|
@ -174,7 +174,7 @@ mpool_realloc( MemPoolCtx* mpool, void* ptr, XP_U32 newsize, const char* file, X
|
||||||
MemPoolEntry* entry = findEntryFor( mpool, ptr, (MemPoolEntry**)NULL );
|
MemPoolEntry* entry = findEntryFor( mpool, ptr, (MemPoolEntry**)NULL );
|
||||||
|
|
||||||
if ( !entry ) {
|
if ( !entry ) {
|
||||||
XP_LOGF( "findEntryFor failed; called from %s, line %d",
|
XP_LOGF( "findEntryFor failed; called from %s, line %ld",
|
||||||
file, lineNo );
|
file, lineNo );
|
||||||
} else {
|
} else {
|
||||||
entry->ptr = XP_PLATREALLOC( entry->ptr, newsize );
|
entry->ptr = XP_PLATREALLOC( entry->ptr, newsize );
|
||||||
|
@ -194,7 +194,7 @@ mpool_free( MemPoolCtx* mpool, void* ptr, const char* file, XP_U32 lineNo )
|
||||||
entry = findEntryFor( mpool, ptr, &prev );
|
entry = findEntryFor( mpool, ptr, &prev );
|
||||||
|
|
||||||
if ( !entry ) {
|
if ( !entry ) {
|
||||||
XP_LOGF( "findEntryFor failed; called from %s, line %d",
|
XP_LOGF( "findEntryFor failed; called from %s, line %ld",
|
||||||
file, lineNo );
|
file, lineNo );
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -336,7 +336,7 @@ createOrLoadObjects( GtkAppGlobals* globals )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
params->gi.gameID = util_getCurSeconds(globals->cGlobals.params->util);
|
params->gi.gameID = util_getCurSeconds(globals->cGlobals.params->util);
|
||||||
XP_STATUSF( "grabbed gameID: %ld\n", params->gi.gameID );
|
XP_STATUSF( "grabbed gameID: %d\n", params->gi.gameID );
|
||||||
|
|
||||||
game_makeNewGame( MEMPOOL &globals->cGlobals.game, ¶ms->gi,
|
game_makeNewGame( MEMPOOL &globals->cGlobals.game, ¶ms->gi,
|
||||||
params->util, (DrawCtx*)globals->draw,
|
params->util, (DrawCtx*)globals->draw,
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void
|
void
|
||||||
linux_debugf( char* format, ... )
|
linux_debugf( const char* format, ... )
|
||||||
{
|
{
|
||||||
char buf[1000];
|
char buf[1000];
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <sys/socket.h>
|
|
||||||
#ifdef XWFEATURE_BLUETOOTH
|
#ifdef XWFEATURE_BLUETOOTH
|
||||||
# include <bluetooth/bluetooth.h>
|
# include <bluetooth/bluetooth.h>
|
||||||
# if defined BT_USE_L2CAP
|
# if defined BT_USE_L2CAP
|
||||||
|
|
|
@ -114,6 +114,7 @@ extern void linux_debugf(const char*, ...)
|
||||||
#define XP_HTONS(s) htons(s)
|
#define XP_HTONS(s) htons(s)
|
||||||
|
|
||||||
#define XP_LD "%ld"
|
#define XP_LD "%ld"
|
||||||
|
#define XP_P "%p"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -120,6 +120,7 @@ XP_U8* palm_realloc(XP_U8* in, XP_U16 size);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define XP_LD "%ld"
|
#define XP_LD "%ld"
|
||||||
|
#define XP_P "%lx"
|
||||||
|
|
||||||
#ifdef FEATURE_SILK
|
#ifdef FEATURE_SILK
|
||||||
# define XP_UNUSED_SILK(x) x
|
# define XP_UNUSED_SILK(x) x
|
||||||
|
|
|
@ -118,6 +118,7 @@ XP_U16 wince_snprintf( XP_UCHAR* buf, XP_U16 len,
|
||||||
#define XP_HTONS(s) htons(s)
|
#define XP_HTONS(s) htons(s)
|
||||||
|
|
||||||
#define XP_LD "%ld"
|
#define XP_LD "%ld"
|
||||||
|
#define XP_P "%p"
|
||||||
|
|
||||||
/* The pocketpc sdk on linux renames certain functions to avoid conflicts
|
/* The pocketpc sdk on linux renames certain functions to avoid conflicts
|
||||||
with same-named posix symbols. */
|
with same-named posix symbols. */
|
||||||
|
|
Loading…
Reference in a new issue