From 83b1d4c364f4c76c0ececde36873d7b480c3f004 Mon Sep 17 00:00:00 2001 From: Eric House Date: Sat, 8 Dec 2012 06:40:21 -0800 Subject: [PATCH] fix compiler warnings --- xwords4/common/game.c | 14 +++++++++----- xwords4/common/server.c | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/xwords4/common/game.c b/xwords4/common/game.c index f61e25ab2..ae73da301 100644 --- a/xwords4/common/game.c +++ b/xwords4/common/game.c @@ -93,10 +93,12 @@ game_makeNewGame( MPFORMAL XWGame* game, CurGameInfo* gi, #endif ) { - XP_U16 nPlayersHere, nPlayersTotal; - - assertUtilOK( util ); +#ifndef XWFEATURE_STANDALONE_ONLY + XP_U16 nPlayersHere = 0; + XP_U16 nPlayersTotal = 0; checkServerRole( gi, &nPlayersHere, &nPlayersTotal ); +#endif + assertUtilOK( util ); gi->gameID = makeGameID( util ); @@ -137,15 +139,17 @@ game_reset( MPFORMAL XWGame* game, CurGameInfo* gi, CommonPrefs* cp, const TransportProcs* procs ) { XP_U16 ii; - XP_U16 nPlayersHere, nPlayersTotal; XP_ASSERT( !!game->model ); XP_ASSERT( !!gi ); - checkServerRole( gi, &nPlayersHere, &nPlayersTotal ); gi->gameID = makeGameID( util ); #ifndef XWFEATURE_STANDALONE_ONLY + XP_U16 nPlayersHere = 0; + XP_U16 nPlayersTotal = 0; + checkServerRole( gi, &nPlayersHere, &nPlayersTotal ); + if ( !!game->comms ) { if ( gi->serverRole == SERVER_STANDALONE ) { comms_destroy( game->comms ); diff --git a/xwords4/common/server.c b/xwords4/common/server.c index 95e4c0759..aebb41ab2 100644 --- a/xwords4/common/server.c +++ b/xwords4/common/server.c @@ -686,7 +686,7 @@ handleRegistrationMsg( ServerCtxt* server, XWStreamCtxt* stream ) { XP_Bool success = XP_TRUE; XP_U16 playersInMsg; - XP_S8 clientIndex; + XP_S8 clientIndex = 0; /* quiet compiler */ XP_U16 ii = 0; LOG_FUNC();