fix to compile without DEBUG set

This commit is contained in:
Eric House 2022-12-21 10:27:12 -08:00
parent 7764c17705
commit 9b1fe83b61
6 changed files with 13 additions and 5 deletions

View file

@ -708,6 +708,7 @@ msgAndTopicProc( void* closure, const XP_UCHAR* topic,
size_t siz = XP_SNPRINTF( (char*)ptr, VSIZE(mtp->storage) - mtp->offset,
"%s", topic );
XP_ASSERT( siz < VSIZE(mtp->storage) - mtp->offset );
XP_USE( siz );
mtp->offset += 1 + XP_STRLEN(ptr);
mtp->jPackets[mtp->count] = makeByteArray( env, msgLen, (const jbyte*)msgBuf );

View file

@ -1627,7 +1627,7 @@ comms_invite( CommsCtxt* comms, XWEnv xwe, const NetLaunchInfo* nli,
void
comms_getInvited( const CommsCtxt* comms, /*XWEnv xwe, */
XP_U16* nInvites, CommsAddrRec* inviteRecs )
XP_U16* nInvites, CommsAddrRec* XP_UNUSED(inviteRecs) )
{
XP_U16 count = 0;

View file

@ -193,7 +193,7 @@ logPtrs( const char* func, int nTopics, char* topics[] )
void
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[] )
{
LOG_FUNC();
@ -216,6 +216,7 @@ dvc_getMQTTSubTopics( XW_DUtilCtxt* dutil, XWEnv xwe,
XP_UCHAR buf2[64];
size_t siz = XP_SNPRINTF( buf2, VSIZE(buf2), "%s/+", buf );
XP_ASSERT( siz < VSIZE(buf) );
XP_USE(siz);
topics[count++] = appendToStorage( storage, &offset, buf2 );
#endif
@ -322,6 +323,7 @@ dvc_makeMQTTInvites( XW_DUtilCtxt* dutil, XWEnv xwe,
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
"%s/%X", devTopic, nli->gameID );
XP_ASSERT( siz < VSIZE(gameTopic) );
XP_USE(siz);
callProc( proc, closure, devTopic, stream );
#endif
@ -371,6 +373,7 @@ dvc_makeMQTTMessages( XW_DUtilCtxt* dutil, XWEnv xwe,
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
"%s/%X", devTopic, gameID );
XP_ASSERT( siz < VSIZE(gameTopic) );
XP_USE(siz);
callProc( proc, closure, gameTopic, stream );
stream_destroy( stream, xwe );
@ -399,6 +402,7 @@ dvc_makeMQTTNoSuchGames( XW_DUtilCtxt* dutil, XWEnv xwe,
size_t siz = XP_SNPRINTF( gameTopic, VSIZE(gameTopic),
"%s/%X", devTopic, gameID );
XP_ASSERT( siz < VSIZE(gameTopic) );
XP_USE(siz);
callProc( proc, closure, gameTopic, stream );
#endif

View file

@ -839,8 +839,8 @@ new_game_impl( GtkGameGlobals* globals, XP_Bool fireConnDlg )
success = gtkNewGameDialog( globals, gi, &cGlobals->selfAddr,
XP_TRUE, fireConnDlg );
if ( success ) {
XP_Bool isClient = gi->serverRole == SERVER_ISCLIENT;
XP_ASSERT( !isClient ); /* Doesn't make sense! Send invitation. */
/* Doesn't make sense! Send invitation. */
XP_ASSERT( gi->serverRole != SERVER_ISCLIENT );
(void)game_reset( MEMPOOL &cGlobals->game, NULL_XWE, gi,
&cGlobals->selfAddr, NULL, cGlobals->util,

View file

@ -137,11 +137,13 @@ linux_dutil_onMessageReceived( XW_DUtilCtxt* duc, XWEnv XP_UNUSED(xwe),
}
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(xwe);
XP_USE(buf);
XP_USE(len);
XP_LOGFF( "got msg len %d", len );
}

View file

@ -2510,6 +2510,7 @@ testStreams( LaunchParams* params )
for ( int ii = 0; ii < VSIZE(nums); ++ii ) {
XP_U32 num = stream_getU32VL( stream );
XP_USE(num);
XP_LOGFF( "compariing num[%d]: %d with %d", ii, nums[ii], num );
XP_ASSERT( num == nums[ii] );
}