From 6352a84e683b4a9ae6ee12851be9d24925a90f81 Mon Sep 17 00:00:00 2001 From: ehouse Date: Sun, 23 Jan 2005 18:02:39 +0000 Subject: [PATCH] eliminate picky compiler warnings --- symbian/inc/symblnk.h | 4 ++-- symbian/src/symaskdlg.cpp | 4 ++-- symbian/src/symdict.cpp | 8 ++++---- symbian/src/symgmdlg.cpp | 8 ++++---- symbian/src/symgmmgr.cpp | 7 ++++--- symbian/src/xwappview.cpp | 15 ++++++++------- 6 files changed, 24 insertions(+), 22 deletions(-) diff --git a/symbian/inc/symblnk.h b/symbian/inc/symblnk.h index 1277fc407..fc84d6ce7 100644 --- a/symbian/inc/symblnk.h +++ b/symbian/inc/symblnk.h @@ -42,9 +42,9 @@ class CXWBlankSelDlg : public CEikDialog TBool OkToExitL( TInt aKeyCode ); private: - CDesC16ArrayFlat* iFacesList; const XP_UCHAR4* iTexts; - TInt* iResultP; TInt iNTiles; + TInt* iResultP; + CDesC16ArrayFlat* iFacesList; }; #endif diff --git a/symbian/src/symaskdlg.cpp b/symbian/src/symaskdlg.cpp index ce359a1c6..52d3718f0 100644 --- a/symbian/src/symaskdlg.cpp +++ b/symbian/src/symaskdlg.cpp @@ -26,13 +26,13 @@ #include "xwords.rsg" CXWAskDlg::CXWAskDlg( MPFORMAL XWStreamCtxt* aStream, TBool aKillStream ) : - iStream(aStream), iKillStream(aKillStream), iMessage(NULL) + iStream(aStream), iMessage(NULL), iKillStream(aKillStream) { MPASSIGN( this->mpool, mpool ); } CXWAskDlg::CXWAskDlg( MPFORMAL TBuf16<128>* aMessage) - : iMessage(aMessage), iStream(NULL) + : iStream(NULL), iMessage(aMessage) { MPASSIGN( this->mpool, mpool ); } diff --git a/symbian/src/symdict.cpp b/symbian/src/symdict.cpp index 2daf25111..45dbc9b1b 100644 --- a/symbian/src/symdict.cpp +++ b/symbian/src/symdict.cpp @@ -79,7 +79,7 @@ symCountSpecials( SymDictCtxt* ctxt ) } /* symCountSpecials */ static XP_Bitmap* -symMakeBitmap( SymDictCtxt* ctxt, RFile* file ) +symMakeBitmap( SymDictCtxt* /*ctxt*/, RFile* file ) { XP_U8 nCols = readXP_U8( file ); // CEBitmapInfo* bitmap = (CEBitmapInfo*)NULL; @@ -253,8 +253,8 @@ sym_dictionary_makeL( MPFORMAL const XP_UCHAR* aDictName ) } ctxt->super.is_4_byte = ctxt->super.nodeSize == 4; - - for ( TInt i = 0; i < numFaces; ++i ) { + TInt i; + for ( i = 0; i < numFaces; ++i ) { ctxt->super.faces16[i] = readXP_U16( &file ); } #else @@ -281,7 +281,7 @@ sym_dictionary_makeL( MPFORMAL const XP_UCHAR* aDictName ) file.Seek( ESeekCurrent, pos ); dawgSize -= pos; - if ( dawgSize > sizeof(XP_U32) ) { + if ( dawgSize > SC(TInt, sizeof(XP_U32)) ) { XP_U32 offset = readXP_U32( &file ); dawgSize -= sizeof(XP_U32); diff --git a/symbian/src/symgmdlg.cpp b/symbian/src/symgmdlg.cpp index 972d27ace..7e3d0ae64 100755 --- a/symbian/src/symgmdlg.cpp +++ b/symbian/src/symgmdlg.cpp @@ -53,7 +53,7 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode ) const CListBoxView::CSelectionIndexArray* indices; box = static_cast(Control(ESelGameChoice)); TInt index = box->CurrentItemIndex(); - TDesC16* selName = &(*iGameMgr->GetNames())[index]; + TDesC16 selName = (*iGameMgr->GetNames())[index]; XP_LOGF( "CXSavedGamesDlg::OkToExitL(%d) called", aKeyCode ); @@ -73,11 +73,11 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode ) break; case XW_SGAMES_RENAME_COMMAND: - if ( 0 == selName->Compare(*iCurName) ) { + if ( 0 == selName.Compare(*iCurName) ) { iOwner->UserErrorFromID( R_ALERT_NO_RENAME_OPEN_GAME ); } else { TGameName newName; - if ( EditSelName( static_cast(selName), &newName ) ) { + if ( EditSelName( static_cast(&selName), &newName ) ) { ResetNames( -1, &newName ); box->DrawDeferred(); } @@ -86,7 +86,7 @@ CXSavedGamesDlg::OkToExitL( TInt aKeyCode ) case XW_SGAMES_DELETE_COMMAND: { XP_LOGF( "delete" ); - if ( 0 == selName->Compare(*iCurName) ) { + if ( 0 == selName.Compare(*iCurName) ) { iOwner->UserErrorFromID( R_ALERT_NO_DELETE_OPEN_GAME ); } else if ( iOwner->UserQuery( (UtilQueryID)SYM_QUERY_CONFIRM_DELGAME, NULL ) ) { diff --git a/symbian/src/symgmmgr.cpp b/symbian/src/symgmmgr.cpp index 9dcb24a64..ab0a29586 100755 --- a/symbian/src/symgmmgr.cpp +++ b/symbian/src/symgmmgr.cpp @@ -166,7 +166,7 @@ CXWGamesMgr::StoreGameL( const TGameName* aName, /* does not have extension */ TInt siz = stream_getSize( aStream ); TUint8* buf = new (ELeave) TUint8[siz]; - stream_getBytes( aStream, buf, siz ); + stream_getBytes( aStream, buf, SC(XP_U16, siz) ); TPtrC8 tbuf( buf, siz ); err = file.Write( tbuf, siz ); XP_ASSERT( err == KErrNone ); @@ -195,7 +195,7 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream ) for ( ; ; ) { TBuf8<256> buf; - TInt err = file.Read( buf, buf.MaxLength() ); + file.Read( buf, buf.MaxLength() ); TInt nRead = buf.Size(); if ( nRead <= 0 ) { break; @@ -209,7 +209,8 @@ CXWGamesMgr::LoadGameL( const TGameName* aName, XWStreamCtxt* aStream ) TBool CXWGamesMgr::DeleteSelected( TInt aIndex ) { - return DeleteFileFor( &(*iNamesList)[aIndex] ); + TPtrC16 aName = (*iNamesList)[aIndex]; + return DeleteFileFor( &aName ); } /* DeleteSelected */ TBool diff --git a/symbian/src/xwappview.cpp b/symbian/src/xwappview.cpp index c7cadb6f6..0b0cc176c 100644 --- a/symbian/src/xwappview.cpp +++ b/symbian/src/xwappview.cpp @@ -543,18 +543,19 @@ CXWordsAppView::DeleteGame() void CXWordsAppView::PositionBoard() { - TRect rect = Rect(); - TInt boardWidth = 15 * scaleBoardH; - const TInt scoreTop = 25; - const TInt scoreHt = 120; + const TRect rect = Rect(); + const XP_U16 boardWidth = 15 * scaleBoardH; + const XP_U16 scoreTop = 25; + const XP_U16 scoreHt = 120; board_setPos( iGame.board, 2, 2, XP_FALSE ); board_setScale( iGame.board, scaleBoardH, scaleBoardV ); - TInt scoreLeft = 2 + boardWidth + 2 + 3; /* 2 for border, 3 for gap */ - TInt scoreRight = rect.iBr.iX - 2 - 1; /* 2 for border */ + XP_U16 scoreLeft = 2 + boardWidth + 2 + 3; /* 2 for border, 3 for gap */ + XP_U16 scoreRight = SC(XP_U16, rect.iBr.iX - 2 - 1); /* 2 for border */ board_setScoreboardLoc( iGame.board, scoreLeft, scoreTop, - scoreRight - scoreLeft - 1, scoreHt, XP_FALSE ); + SC( XP_U16, scoreRight - scoreLeft - 1), + scoreHt, XP_FALSE ); board_setYOffset( iGame.board, 0 ); board_setTrayLoc( iGame.board,