mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-30 08:34:16 +01:00
fix to compile when DEBUG not defined
This commit is contained in:
parent
bf39f9194c
commit
93a7c7f817
3 changed files with 15 additions and 2 deletions
|
@ -49,6 +49,7 @@ openGamesDB( const char* dbName )
|
||||||
"CREATE TABLE pairs ( key TEXT UNIQUE,value TEXT )";
|
"CREATE TABLE pairs ( key TEXT UNIQUE,value TEXT )";
|
||||||
result = sqlite3_exec( pDb, createValuesStr, NULL, NULL, NULL );
|
result = sqlite3_exec( pDb, createValuesStr, NULL, NULL, NULL );
|
||||||
XP_LOGF( "sqlite3_exec=>%d", result );
|
XP_LOGF( "sqlite3_exec=>%d", result );
|
||||||
|
XP_USE( result );
|
||||||
|
|
||||||
return pDb;
|
return pDb;
|
||||||
}
|
}
|
||||||
|
@ -87,6 +88,7 @@ writeToDB( XWStreamCtxt* stream, void* closure )
|
||||||
XP_ASSERT( SQLITE_OK == result );
|
XP_ASSERT( SQLITE_OK == result );
|
||||||
result = sqlite3_step( stmt );
|
result = sqlite3_step( stmt );
|
||||||
XP_ASSERT( SQLITE_DONE == result );
|
XP_ASSERT( SQLITE_DONE == result );
|
||||||
|
XP_USE( result );
|
||||||
|
|
||||||
if ( newGame ) { /* new row; need to insert blob first */
|
if ( newGame ) { /* new row; need to insert blob first */
|
||||||
selRow = sqlite3_last_insert_rowid( pDb );
|
selRow = sqlite3_last_insert_rowid( pDb );
|
||||||
|
@ -142,6 +144,7 @@ summarize( CommonGlobals* cGlobals )
|
||||||
result = sqlite3_step( stmt );
|
result = sqlite3_step( stmt );
|
||||||
XP_ASSERT( SQLITE_DONE == result );
|
XP_ASSERT( SQLITE_DONE == result );
|
||||||
sqlite3_finalize( stmt );
|
sqlite3_finalize( stmt );
|
||||||
|
XP_USE( result );
|
||||||
}
|
}
|
||||||
|
|
||||||
GSList*
|
GSList*
|
||||||
|
@ -154,6 +157,7 @@ listGames( sqlite3* pDb )
|
||||||
"SELECT rowid FROM games ORDER BY rowid",
|
"SELECT rowid FROM games ORDER BY rowid",
|
||||||
-1, &ppStmt, NULL );
|
-1, &ppStmt, NULL );
|
||||||
XP_ASSERT( SQLITE_OK == result );
|
XP_ASSERT( SQLITE_OK == result );
|
||||||
|
XP_USE( result );
|
||||||
while ( NULL != ppStmt ) {
|
while ( NULL != ppStmt ) {
|
||||||
switch( sqlite3_step( ppStmt ) ) {
|
switch( sqlite3_step( ppStmt ) ) {
|
||||||
case SQLITE_ROW: /* have data */
|
case SQLITE_ROW: /* have data */
|
||||||
|
@ -233,6 +237,7 @@ deleteGame( sqlite3* pDb, sqlite3_int64 rowid )
|
||||||
XP_ASSERT( SQLITE_OK == result );
|
XP_ASSERT( SQLITE_OK == result );
|
||||||
result = sqlite3_step( ppStmt );
|
result = sqlite3_step( ppStmt );
|
||||||
XP_ASSERT( SQLITE_DONE == result );
|
XP_ASSERT( SQLITE_DONE == result );
|
||||||
|
XP_USE( result );
|
||||||
sqlite3_finalize( ppStmt );
|
sqlite3_finalize( ppStmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -248,6 +253,7 @@ db_store( sqlite3* pDb, const gchar* key, const gchar* value )
|
||||||
XP_ASSERT( SQLITE_OK == result );
|
XP_ASSERT( SQLITE_OK == result );
|
||||||
result = sqlite3_step( ppStmt );
|
result = sqlite3_step( ppStmt );
|
||||||
XP_ASSERT( SQLITE_DONE == result );
|
XP_ASSERT( SQLITE_DONE == result );
|
||||||
|
XP_USE( result );
|
||||||
sqlite3_finalize( ppStmt );
|
sqlite3_finalize( ppStmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -282,11 +288,13 @@ db_remove( sqlite3* pDb, const gchar* key )
|
||||||
XP_ASSERT( SQLITE_OK == result );
|
XP_ASSERT( SQLITE_OK == result );
|
||||||
result = sqlite3_step( ppStmt );
|
result = sqlite3_step( ppStmt );
|
||||||
XP_ASSERT( SQLITE_DONE == result );
|
XP_ASSERT( SQLITE_DONE == result );
|
||||||
|
XP_USE( result );
|
||||||
sqlite3_finalize( ppStmt );
|
sqlite3_finalize( ppStmt );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
getColumnText( sqlite3_stmt *ppStmt, int iCol, XP_UCHAR* buf, int len )
|
getColumnText( sqlite3_stmt *ppStmt, int iCol, XP_UCHAR* buf,
|
||||||
|
int XP_UNUSED_DBG(len) )
|
||||||
{
|
{
|
||||||
const unsigned char* txt = sqlite3_column_text( ppStmt, iCol );
|
const unsigned char* txt = sqlite3_column_text( ppStmt, iCol );
|
||||||
int needLen = sqlite3_column_bytes( ppStmt, iCol );
|
int needLen = sqlite3_column_bytes( ppStmt, iCol );
|
||||||
|
|
|
@ -248,7 +248,10 @@ handle_delete_button( GtkWidget* XP_UNUSED(widget), void* closure )
|
||||||
sqlite3_int64 rowid = g_array_index( apg->selRows, sqlite3_int64, ii );
|
sqlite3_int64 rowid = g_array_index( apg->selRows, sqlite3_int64, ii );
|
||||||
|
|
||||||
GameInfo gib;
|
GameInfo gib;
|
||||||
XP_Bool success = getGameInfo( params->pDb, rowid, &gib );
|
#ifdef DEBUG
|
||||||
|
XP_Bool success =
|
||||||
|
#endif
|
||||||
|
getGameInfo( params->pDb, rowid, &gib );
|
||||||
XP_ASSERT( success );
|
XP_ASSERT( success );
|
||||||
XP_U32 clientToken = makeClientToken( rowid, gib.seed );
|
XP_U32 clientToken = makeClientToken( rowid, gib.seed );
|
||||||
removeRow( apg, rowid );
|
removeRow( apg, rowid );
|
||||||
|
@ -477,6 +480,7 @@ gtkGotBuf( void* closure, const XP_U8* buf, XP_U16 len )
|
||||||
freeGlobals( &tmpGlobals );
|
freeGlobals( &tmpGlobals );
|
||||||
}
|
}
|
||||||
XP_ASSERT( seed == 0 || gotSeed == seed );
|
XP_ASSERT( seed == 0 || gotSeed == seed );
|
||||||
|
XP_USE( seed );
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
|
|
@ -231,6 +231,7 @@ relaycon_receive( void* closure, int socket )
|
||||||
}
|
}
|
||||||
case XWPDEV_ACK: {
|
case XWPDEV_ACK: {
|
||||||
XP_U32 packetID = getNetLong( &ptr );
|
XP_U32 packetID = getNetLong( &ptr );
|
||||||
|
XP_USE( packetID );
|
||||||
XP_LOGF( "got ack for packetID %ld", packetID );
|
XP_LOGF( "got ack for packetID %ld", packetID );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue