mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
Quash some compile-time warnings. snprintf instead of sprintf.
This commit is contained in:
parent
03d12bacd3
commit
07e3b26e60
4 changed files with 8 additions and 2 deletions
|
@ -526,7 +526,7 @@ setLimitsFrom( const BoardCtxt* board, BdHintLimits* limits )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
scrollTimerProc( void* closure, XWTimerReason why )
|
scrollTimerProc( void* closure, XWTimerReason XP_UNUSED_DBG(why) )
|
||||||
{
|
{
|
||||||
XP_Bool draw = XP_FALSE;
|
XP_Bool draw = XP_FALSE;
|
||||||
BoardCtxt* board = (BoardCtxt*)closure;
|
BoardCtxt* board = (BoardCtxt*)closure;
|
||||||
|
|
|
@ -143,6 +143,10 @@ game_reset( MPFORMAL XWGame* game, CurGameInfo* gi,
|
||||||
nPlayersHere, nPlayersTotal,
|
nPlayersHere, nPlayersTotal,
|
||||||
sendproc, IF_CH(resetproc) closure );
|
sendproc, IF_CH(resetproc) closure );
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
# ifdef DEBUG
|
||||||
|
mpool = mpool; /* quash unused formal warning */
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
model_init( game->model, gi->boardSize, gi->boardSize );
|
model_init( game->model, gi->boardSize, gi->boardSize );
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include "cedebug.h"
|
#include "cedebug.h"
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
|
@ -120,7 +121,7 @@ logLastError( const char* comment )
|
||||||
XP_U16 len;
|
XP_U16 len;
|
||||||
XP_U16 lenSoFar;
|
XP_U16 lenSoFar;
|
||||||
|
|
||||||
sprintf( msg, "%s (err: %ld): ", comment, lastErr );
|
snprintf( msg, sizeof(msg), "%s (err: %ld): ", comment, lastErr );
|
||||||
lenSoFar = strlen( msg );
|
lenSoFar = strlen( msg );
|
||||||
|
|
||||||
FormatMessage(
|
FormatMessage(
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <windowsx.h>
|
#include <windowsx.h>
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include <commdlg.h>
|
#include <commdlg.h>
|
||||||
|
#include <wchar.h>
|
||||||
#ifdef _win32_wce
|
#ifdef _win32_wce
|
||||||
#include <aygshell.h>
|
#include <aygshell.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue