Eliminate various warnings about unused variables
authorMikko Rasa <tdb@tdb.fi>
Wed, 2 Nov 2011 12:07:18 +0000 (14:07 +0200)
committerMikko Rasa <tdb@tdb.fi>
Wed, 2 Nov 2011 15:05:23 +0000 (17:05 +0200)
17 files changed:
src/CryptHelpers.cpp
src/DiagnosticsUtil.cpp
src/LinkedOptionsMenu.cpp
src/RageDisplay_OGL.cpp
src/RageFileManager.cpp
src/ScreenEdit.cpp
src/ScreenGameplay.cpp
src/ScreenOptions.cpp
src/ScreenOptionsMaster.cpp
src/ScreenPlayLights.cpp
src/ScreenRanking.cpp
src/ScreenUserPacks.cpp
src/ScreenWithMenuElements.cpp
src/UserPackManager.cpp
src/arch/Sound/RageSoundDriver_ALSA9.cpp
src/archutils/Unix/CrashHandler.cpp
src/ibutton/owtrnu.c

index fa6ade7..9d86277 100755 (executable)
@@ -47,7 +47,7 @@ static void PKCS8EncodePrivateKey( unsigned char *pkbuf, unsigned long bufsize,
 static bool PKCS8DecodePrivateKey( const unsigned char *pkcsbuf, unsigned long bufsize, unsigned char *szOut, unsigned long &outsize )
 {
        ltc_asn1_list *pkAlgObject;
-       int err = der_decode_sequence_flexi(pkcsbuf, &bufsize, &pkAlgObject);
+       der_decode_sequence_flexi(pkcsbuf, &bufsize, &pkAlgObject);
 
 #define RET_IF_NULL_THEN_ASSIGN(x ) { if ( (x) == NULL ) return false; pkAlgObject = (x); }
        RET_IF_NULL_THEN_ASSIGN( pkAlgObject );
index 50883ec..94c1ae3 100644 (file)
@@ -104,7 +104,6 @@ int DiagnosticsUtil::GetNumMachineScores()
 
                FOREACHM_CONST( StepsID, Profile::HighScoresForASteps, hsSong.m_StepsHighScores, j )
                {
-                       const StepsID &stepsID = j->first;
                        const Profile::HighScoresForASteps &hsSteps = j->second;
                        const HighScoreList &hsl = hsSteps.hsl;
 
index 7e4b370..6b50292 100644 (file)
@@ -96,7 +96,6 @@ void LinkedOptionsMenu::Unfocus()
 
 void LinkedOptionsMenu::SetChoices( const CStringArray &asChoices )
 {
-       unsigned iPrevNumChoices = m_Rows.size();
        ClearChoices();
 
        for( unsigned i = 0; i < asChoices.size(); i++ )
index f536972..2e4002a 100755 (executable)
@@ -86,8 +86,6 @@ const GLenum RageSpriteVertexFormat = GL_T2F_C4F_N3F_V3F;
 /* If we support texture matrix scaling, a handle to the vertex program: */
 static GLhandleARB g_bTextureMatrixShader = 0;
 
-static bool g_ShaderCompiled = false;
-
 LowLevelWindow *wind;
 
 static void InvalidateAllGeometry();
index 2013611..9f2ddab 100755 (executable)
@@ -725,8 +725,6 @@ CString RageFileManager::ResolvePath( const CString &sPath_ )
                if ( sDriverPath.empty() || pDriver->m_sRoot.empty() )
                        continue;
 
-               FileType type = pDriver->m_pDriver->GetFileType(sPath);
-
                if ( pDriver->m_sType != "dir" && pDriver->m_sType != "dirro" )
                        continue;
        
index 38ef48f..0241d6f 100755 (executable)
@@ -1441,7 +1441,6 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
                        }
                        else
                        {
-                               bool bAlreadyBGChangeHere = false;
                                BackgroundLayer iLayer = BACKGROUND_LAYER_1;
                                BackgroundChange bgChange;
                                bgChange.m_fStartBeat = GAMESTATE->m_fSongBeat;
@@ -1449,7 +1448,6 @@ void ScreenEdit::InputEdit( const DeviceInput& DeviceI, const InputEventType typ
                                {
                                        if( bgc->m_fStartBeat == GAMESTATE->m_fSongBeat )
                                        {
-                                               bAlreadyBGChangeHere = true;
                                                bgChange = *bgc;
                                                m_pSong->GetBackgroundChanges(iLayer).erase( bgc );
                                                break;
index f59089c..77d5db9 100755 (executable)
@@ -1761,18 +1761,12 @@ void ScreenGameplay::UpdateLights()
        bool bBlinkGameButton[MAX_GAME_CONTROLLERS][MAX_GAME_BUTTONS];\r
        ZERO( bBlinkCabinetLight );\r
        ZERO( bBlinkGameButton );\r
-       bool bCrossedABeat = false;\r
        {\r
                const float fSongBeat = GAMESTATE->m_fLightSongBeat;\r
                const int iSongRow = BeatToNoteRowNotRounded( fSongBeat );\r
 \r
                static int iRowLastCrossed = 0;\r
 \r
-               float fBeatLast = roundf(NoteRowToBeat(iRowLastCrossed));\r
-               float fBeatNow = roundf(NoteRowToBeat(iSongRow));\r
-\r
-               bCrossedABeat = fBeatLast != fBeatNow;\r
-\r
                FOREACH_CabinetLight( cl )\r
                {       \r
                        // for each index we crossed since the last update:\r
index 37887e5..dc99fa9 100755 (executable)
@@ -926,17 +926,11 @@ void ScreenOptions::ChangeValueInRow( PlayerNumber pn, int iDelta, bool Repeat )
        if( Repeat && !ALLOW_REPEATING_CHANGE_VALUE_INPUT )
                return;
 
-       bool bOneChanged = false;
-
-
        int iCurrentChoiceWithFocus = row.GetChoiceInRowWithFocus(pn);
        int iNewChoiceWithFocus = iCurrentChoiceWithFocus + iDelta;
        ASSERT( iNumChoices > 0 );
        wrap( iNewChoiceWithFocus, iNumChoices );
        
-       if( iCurrentChoiceWithFocus != iNewChoiceWithFocus )
-               bOneChanged = true;
-
        row.SetChoiceInRowWithFocus( pn, iNewChoiceWithFocus );
        StoreFocus( pn );
 
index d4c2cc1..98d3825 100755 (executable)
@@ -51,7 +51,6 @@ void ScreenOptionsMaster::Init()
        CStringArray Flags;
        split( OPTION_MENU_FLAGS, ";", Flags, true );
        InputMode im = INPUTMODE_INDIVIDUAL;
-       bool Explanations = false;
        
        for( unsigned i = 0; i < Flags.size(); ++i )
        {
@@ -61,7 +60,7 @@ void ScreenOptionsMaster::Init()
                if( sFlag == "together" )
                        im = INPUTMODE_SHARE_CURSOR;
                else if( sFlag == "explanations" )
-                       Explanations = true;
+                       ;
                else if( sFlag == "forceallplayers" )
                {
                        FOREACH_PlayerNumber( pn )
index 274971c..95bb0a0 100644 (file)
@@ -176,18 +176,12 @@ void ScreenPlayLights::UpdateLights()
        ZERO( bBlinkGameButton );
 
        /* update the lights data */
-       bool bCrossedABeat = false;
        {
                const float fSongBeat = GAMESTATE->m_fLightSongBeat;
                const int iSongRow = BeatToNoteRowNotRounded( fSongBeat );
 
                static int iRowLastCrossed = 0;
 
-               float fBeatLast = roundf(NoteRowToBeat(iRowLastCrossed));
-               float fBeatNow = roundf(NoteRowToBeat(iSongRow));
-
-               bCrossedABeat = fBeatLast != fBeatNow;
-
                // keep all cabinet lights (except buttons) on if the steps haven't started.
                if( GAMESTATE->m_fSongBeat < GAMESTATE->m_pCurSong->m_fFirstBeat )
                {
index f130bb8..67c9c24 100755 (executable)
@@ -860,12 +860,9 @@ float ScreenRanking::SetPage( PageToShow pts )
                                        {
                                                HighScoreList &hsl = PROFILEMAN->GetMachineProfile()->GetStepsHighScoreList(pSong,pSteps);
                                                HighScore hs = hsl.GetTopScore();
-                                               bool bRecentHighScore = false;
                                                if( !hsl.vHighScores.empty() )
                                                {
                                                        hs = hsl.GetTopScore();
-                                                       const CString *psName = &hsl.GetTopScore().sName;
-                                                       bRecentHighScore = find( GAMESTATE->m_vpsNamesThatWereFilled.begin(), GAMESTATE->m_vpsNamesThatWereFilled.end(), psName ) != GAMESTATE->m_vpsNamesThatWereFilled.end();
                                                }
                                                else
                                                {
@@ -907,12 +904,9 @@ float ScreenRanking::SetPage( PageToShow pts )
                                        const HighScoreList &hsl = PROFILEMAN->GetMachineProfile()->GetCourseHighScoreList( pCourse, pTrail );
 
                                        HighScore hs;
-                                       bool bRecentHighScore = false;
                                        if( !hsl.vHighScores.empty() )
                                        {
                                                hs = hsl.vHighScores[0];
-                                               const CString *psName = &hsl.GetTopScore().sName;
-                                               bRecentHighScore = find( GAMESTATE->m_vpsNamesThatWereFilled.begin(), GAMESTATE->m_vpsNamesThatWereFilled.end(), psName ) != GAMESTATE->m_vpsNamesThatWereFilled.end();
                                        }
                                        else
                                        {
index 30eda35..f5388dc 100644 (file)
@@ -147,7 +147,6 @@ void ScreenUserPacks::StartSongThread()
 {
        while ( !m_bStopThread )
        {
-               bool bLaunchPrompt = false;
                if (m_bPrompt)
                {
                        usleep( 10000 );
@@ -340,7 +339,6 @@ void ScreenUserPacks::HandleScreenMessage( const ScreenMessage SM )
        }
        if ( SM == SM_AnswerConfirmAddZip )
        {
-               bool bSuccess = false, bBreakEarly = false, bSkip = false;
                CString sError;
 
                m_bPrompt = false;
@@ -367,9 +365,6 @@ m_bStopThread = false; \
 m_PlayerSongLoadThread.Create( InitSASSongThread, this )
 ////////////////////////
 
-                       bBreakEarly = false;
-                       bSkip = false;
-
                        g_CurXferFile = MEM_CARD_MOUNT_POINT[m_CurPlayer] + "/" + USER_PACK_TRANSFER_PATH + sSelection;
                        if ( !UPACKMAN->IsPackTransferable( sSelection, g_CurXferFile, sError ) || !UPACKMAN->IsPackMountable( g_CurXferFile, sError ) )
                        {
index c883cb6..aa7db67 100755 (executable)
@@ -247,18 +247,12 @@ void ScreenWithMenuElements::UpdateLights()
        ZERO( bBlinkCabinetLight );
 
        /* update the lights data */
-       bool bCrossedABeat = false;
        {
                const float fSongBeat = GAMESTATE->m_fLightSongBeat;
                const int iSongRow = BeatToNoteRowNotRounded( fSongBeat );
 
                static int iRowLastCrossed = 0;
 
-               float fBeatLast = roundf(NoteRowToBeat(iRowLastCrossed));
-               float fBeatNow = roundf(NoteRowToBeat(iSongRow));
-
-               bCrossedABeat = fBeatLast != fBeatNow;
-
                FOREACH_CabinetLight( cl )
                {
                        FOREACH_NONEMPTY_ROW_IN_TRACK_RANGE( m_NoteData, cl, r, iRowLastCrossed+1, iSongRow+1 )
index d9134e7..3b89c55 100644 (file)
@@ -168,7 +168,6 @@ CString UserPackManager::GetPackMountPoint( const CString &sPack )
        CHECKPOINT_M( sPack );
        // it should already be a valid zip by now...
        ASSERT( pZip->Load( sPack ) );
-       UserPackMountType upmt = UPACK_MOUNT_SONGS;
 
        CStringArray asRootEntries;
        pZip->GetDirListing( "/", asRootEntries, true, false );
index 4eb865d..83fa980 100755 (executable)
@@ -30,8 +30,8 @@ void RageSoundDriver_ALSA9::MixerThread()
        while(!shutdown)
        {
                /* Sleep for the size of one chunk. */
-               const int chunksize_frames = max_writeahead / num_chunks;
-               float sleep_secs = (float(chunksize_frames) / samplerate);
+               //const int chunksize_frames = max_writeahead / num_chunks;
+               //float sleep_secs = (float(chunksize_frames) / samplerate);
                usleep( 20000 ); // int(1000 * sleep_secs));
 
                LockMut( m_Mutex );
index a387995..000c464 100755 (executable)
@@ -271,7 +271,6 @@ static void RunCrashHandler( const CrashData *crash )
                /* non-fatal */
        }
               
-       static int received = 0;
        static int active = 0;
 
        if( active )
@@ -302,7 +301,6 @@ static void RunCrashHandler( const CrashData *crash )
                _exit(1);
        }
        active = 1;
-       received = getpid();
 
        /* Stop other threads.  XXX: This prints a spurious ptrace error if any threads
         * are already suspended, which happens in ForceCrashHandlerDeadlock(). */
index 67b60e1..6d632ee 100644 (file)
@@ -78,7 +78,7 @@ static SMALLINT Copy_Scratchpad(int,int,SMALLINT);
 SMALLINT owBlock(int portnum, SMALLINT do_reset, uchar *tran_buf, SMALLINT tran_len)\r
 {\r
    uchar sendpacket[320];\r
-   uchar sendlen=0,pos,i;\r
+   uchar sendlen=0,i;\r
 \r
    // check for a block too big\r
    if (tran_len > 160)\r
@@ -106,7 +106,6 @@ SMALLINT owBlock(int portnum, SMALLINT do_reset, uchar *tran_buf, SMALLINT tran_
    }\r
 \r
    // add the bytes to send\r
-   pos = sendlen;\r
    for (i = 0; i < tran_len; i++)\r
    {\r
       sendpacket[sendlen++] = tran_buf[i];\r