mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-02-05 20:45:49 +01:00
fix to compile without DEBUG set
This commit is contained in:
parent
7764c17705
commit
9b1fe83b61
6 changed files with 13 additions and 5 deletions
|
@ -708,6 +708,7 @@ msgAndTopicProc( void* closure, const XP_UCHAR* topic,
|
||||||
size_t siz = XP_SNPRINTF( (char*)ptr, VSIZE(mtp->storage) - mtp->offset,
|
size_t siz = XP_SNPRINTF( (char*)ptr, VSIZE(mtp->storage) - mtp->offset,
|
||||||
"%s", topic );
|
"%s", topic );
|
||||||
XP_ASSERT( siz < VSIZE(mtp->storage) - mtp->offset );
|
XP_ASSERT( siz < VSIZE(mtp->storage) - mtp->offset );
|
||||||
|
XP_USE( siz );
|
||||||
mtp->offset += 1 + XP_STRLEN(ptr);
|
mtp->offset += 1 + XP_STRLEN(ptr);
|
||||||
|
|
||||||
mtp->jPackets[mtp->count] = makeByteArray( env, msgLen, (const jbyte*)msgBuf );
|
mtp->jPackets[mtp->count] = makeByteArray( env, msgLen, (const jbyte*)msgBuf );
|
||||||
|
|
|
@ -1627,7 +1627,7 @@ comms_invite( CommsCtxt* comms, XWEnv xwe, const NetLaunchInfo* nli,
|
||||||
|
|
||||||
void
|
void
|
||||||
comms_getInvited( const CommsCtxt* comms, /*XWEnv xwe, */
|
comms_getInvited( const CommsCtxt* comms, /*XWEnv xwe, */
|
||||||
XP_U16* nInvites, CommsAddrRec* inviteRecs )
|
XP_U16* nInvites, CommsAddrRec* XP_UNUSED(inviteRecs) )
|
||||||
{
|
{
|
||||||
XP_U16 count = 0;
|
XP_U16 count = 0;
|
||||||
|
|
||||||
|
|
|
@ -193,7 +193,7 @@ logPtrs( const char* func, int nTopics, char* topics[] )
|
||||||
|
|
||||||
void
|
void
|
||||||
dvc_getMQTTSubTopics( XW_DUtilCtxt* dutil, XWEnv xwe,
|
dvc_getMQTTSubTopics( XW_DUtilCtxt* dutil, XWEnv xwe,
|
||||||
XP_UCHAR* storage, XP_U16 storageLen,
|
XP_UCHAR* storage, XP_U16 XP_UNUSED_DBG(storageLen),
|
||||||
XP_U16* nTopics, XP_UCHAR* topics[] )
|
XP_U16* nTopics, XP_UCHAR* topics[] )
|
||||||
{
|
{
|
||||||
LOG_FUNC();
|
LOG_FUNC();
|
||||||
|
@ -216,6 +216,7 @@ dvc_getMQTTSubTopics( XW_DUtilCtxt* dutil, XWEnv xwe,
|
||||||
XP_UCHAR buf2[64];
|
XP_UCHAR buf2[64];
|
||||||
size_t siz = XP_SNPRINTF( buf2, VSIZE(buf2), "%s/+", buf );
|
size_t siz = XP_SNPRINTF( buf2, VSIZE(buf2), "%s/+", buf );
|
||||||
XP_ASSERT( siz < VSIZE(buf) );
|
XP_ASSERT( siz < VSIZE(buf) );
|
||||||
|
XP_USE(siz);
|
||||||
topics[count++] = appendToStorage( storage, &offset, buf2 );
|
topics[count++] = appendToStorage( storage, &offset, buf2 );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -322,6 +323,7 @@ dvc_makeMQTTInvites( XW_DUtilCtxt* dutil, XWEnv xwe,
|
||||||
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
|
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
|
||||||
"%s/%X", devTopic, nli->gameID );
|
"%s/%X", devTopic, nli->gameID );
|
||||||
XP_ASSERT( siz < VSIZE(gameTopic) );
|
XP_ASSERT( siz < VSIZE(gameTopic) );
|
||||||
|
XP_USE(siz);
|
||||||
callProc( proc, closure, devTopic, stream );
|
callProc( proc, closure, devTopic, stream );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -371,6 +373,7 @@ dvc_makeMQTTMessages( XW_DUtilCtxt* dutil, XWEnv xwe,
|
||||||
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
|
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
|
||||||
"%s/%X", devTopic, gameID );
|
"%s/%X", devTopic, gameID );
|
||||||
XP_ASSERT( siz < VSIZE(gameTopic) );
|
XP_ASSERT( siz < VSIZE(gameTopic) );
|
||||||
|
XP_USE(siz);
|
||||||
|
|
||||||
callProc( proc, closure, gameTopic, stream );
|
callProc( proc, closure, gameTopic, stream );
|
||||||
stream_destroy( stream, xwe );
|
stream_destroy( stream, xwe );
|
||||||
|
@ -399,6 +402,7 @@ dvc_makeMQTTNoSuchGames( XW_DUtilCtxt* dutil, XWEnv xwe,
|
||||||
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
|
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
|
||||||
"%s/%X", devTopic, gameID );
|
"%s/%X", devTopic, gameID );
|
||||||
XP_ASSERT( siz < VSIZE(gameTopic) );
|
XP_ASSERT( siz < VSIZE(gameTopic) );
|
||||||
|
XP_USE(siz);
|
||||||
callProc( proc, closure, gameTopic, stream );
|
callProc( proc, closure, gameTopic, stream );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -839,8 +839,8 @@ new_game_impl( GtkGameGlobals* globals, XP_Bool fireConnDlg )
|
||||||
success = gtkNewGameDialog( globals, gi, &cGlobals->selfAddr,
|
success = gtkNewGameDialog( globals, gi, &cGlobals->selfAddr,
|
||||||
XP_TRUE, fireConnDlg );
|
XP_TRUE, fireConnDlg );
|
||||||
if ( success ) {
|
if ( success ) {
|
||||||
XP_Bool isClient = gi->serverRole == SERVER_ISCLIENT;
|
/* Doesn't make sense! Send invitation. */
|
||||||
XP_ASSERT( !isClient ); /* Doesn't make sense! Send invitation. */
|
XP_ASSERT( gi->serverRole != SERVER_ISCLIENT );
|
||||||
|
|
||||||
(void)game_reset( MEMPOOL &cGlobals->game, NULL_XWE, gi,
|
(void)game_reset( MEMPOOL &cGlobals->game, NULL_XWE, gi,
|
||||||
&cGlobals->selfAddr, NULL, cGlobals->util,
|
&cGlobals->selfAddr, NULL, cGlobals->util,
|
||||||
|
|
|
@ -137,11 +137,13 @@ linux_dutil_onMessageReceived( XW_DUtilCtxt* duc, XWEnv XP_UNUSED(xwe),
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
linux_dutil_onCtrlReceived( XW_DUtilCtxt* duc, XWEnv xwe, const XP_U8* buf, XP_U16 len )
|
linux_dutil_onCtrlReceived( XW_DUtilCtxt* duc, XWEnv xwe,
|
||||||
|
const XP_U8* buf, XP_U16 len )
|
||||||
{
|
{
|
||||||
XP_USE(duc);
|
XP_USE(duc);
|
||||||
XP_USE(xwe);
|
XP_USE(xwe);
|
||||||
XP_USE(buf);
|
XP_USE(buf);
|
||||||
|
XP_USE(len);
|
||||||
XP_LOGFF( "got msg len %d", len );
|
XP_LOGFF( "got msg len %d", len );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2510,6 +2510,7 @@ testStreams( LaunchParams* params )
|
||||||
|
|
||||||
for ( int ii = 0; ii < VSIZE(nums); ++ii ) {
|
for ( int ii = 0; ii < VSIZE(nums); ++ii ) {
|
||||||
XP_U32 num = stream_getU32VL( stream );
|
XP_U32 num = stream_getU32VL( stream );
|
||||||
|
XP_USE(num);
|
||||||
XP_LOGFF( "compariing num[%d]: %d with %d", ii, nums[ii], num );
|
XP_LOGFF( "compariing num[%d]: %d with %d", ii, nums[ii], num );
|
||||||
XP_ASSERT( num == nums[ii] );
|
XP_ASSERT( num == nums[ii] );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue