Fix errors, all in debug-only code, flagged by __attribute__ format addition.

This commit is contained in:
ehouse 2008-03-11 12:24:23 +00:00
parent 4a6f07d1fa
commit a3bc875191
8 changed files with 11 additions and 9 deletions

View file

@ -1131,7 +1131,7 @@ validateInitialMessage( CommsCtxt* comms, XP_Bool hasPayload,
rec = NULL;
}
}
LOG_RETURNF( "%lx", rec );
LOG_RETURNF( XP_P, rec );
return rec;
#else
AddressRecord* rec = getRecordFor( comms, addr, *channelNo );
@ -1171,7 +1171,7 @@ validateChannelMessage( CommsCtxt* comms, const CommsAddrRec* addr,
rec->lastACK = (XP_U16)lastMsgRcd;
#endif
} else {
XP_LOGF( "%s: expected %d, got %d", __func__,
XP_LOGF( "%s: expected %ld, got %ld", __func__,
rec->lastMsgRcd + 1, msgID );
rec = NULL;
}
@ -1179,7 +1179,7 @@ validateChannelMessage( CommsCtxt* comms, const CommsAddrRec* addr,
XP_LOGF( "%s: no rec for addr", __func__ );
}
LOG_RETURNF( "%lx", rec );
LOG_RETURNF( XP_P, rec );
return rec;
} /* validateChannelMessage */

View file

@ -96,7 +96,7 @@ mpool_destroy( MemPoolCtx* mpool )
MemPoolEntry* entry;
for ( entry = mpool->usedList; !!entry; entry = entry->next ) {
#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 );
#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 );
if ( !entry ) {
XP_LOGF( "findEntryFor failed; called from %s, line %d",
XP_LOGF( "findEntryFor failed; called from %s, line %ld",
file, lineNo );
} else {
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 );
if ( !entry ) {
XP_LOGF( "findEntryFor failed; called from %s, line %d",
XP_LOGF( "findEntryFor failed; called from %s, line %ld",
file, lineNo );
} else {

View file

@ -336,7 +336,7 @@ createOrLoadObjects( GtkAppGlobals* globals )
#endif
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, &params->gi,
params->util, (DrawCtx*)globals->draw,

View file

@ -63,7 +63,7 @@
#ifdef DEBUG
void
linux_debugf( char* format, ... )
linux_debugf( const char* format, ... )
{
char buf[1000];
va_list ap;

View file

@ -25,7 +25,6 @@
#include <errno.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/socket.h>
#ifdef XWFEATURE_BLUETOOTH
# include <bluetooth/bluetooth.h>
# if defined BT_USE_L2CAP

View file

@ -114,6 +114,7 @@ extern void linux_debugf(const char*, ...)
#define XP_HTONS(s) htons(s)
#define XP_LD "%ld"
#define XP_P "%p"
#endif

View file

@ -120,6 +120,7 @@ XP_U8* palm_realloc(XP_U8* in, XP_U16 size);
#endif
#define XP_LD "%ld"
#define XP_P "%lx"
#ifdef FEATURE_SILK
# define XP_UNUSED_SILK(x) x

View file

@ -118,6 +118,7 @@ XP_U16 wince_snprintf( XP_UCHAR* buf, XP_U16 len,
#define XP_HTONS(s) htons(s)
#define XP_LD "%ld"
#define XP_P "%p"
/* The pocketpc sdk on linux renames certain functions to avoid conflicts
with same-named posix symbols. */