From f98097ad55f449b368e84d46dc71dea66c5a602f Mon Sep 17 00:00:00 2001 From: Adrian Thurston Date: Sun, 30 Nov 2014 10:56:08 -0500 Subject: removed iter vars no longer used, clears warnings refs #20 --- ragel/cdcodegen.cpp | 1 - ragel/cdfflat.cpp | 4 ---- ragel/cdflat.cpp | 16 ++-------------- ragel/cdtable.cpp | 1 - 4 files changed, 2 insertions(+), 20 deletions(-) diff --git a/ragel/cdcodegen.cpp b/ragel/cdcodegen.cpp index 519cc308..bce25559 100644 --- a/ragel/cdcodegen.cpp +++ b/ragel/cdcodegen.cpp @@ -160,7 +160,6 @@ std::ostream &FsmCodeGen::ACTIONS_ARRAY() taA.OPEN(); taA.VAL( 0 ); - int totalActions = 1; for ( GenActionTableMap::Iter act = redFsm->actionMap; act.lte(); act++ ) { /* Write out the length, which will never be the last character. */ taA.VAL( act->key.length() ); diff --git a/ragel/cdfflat.cpp b/ragel/cdfflat.cpp index b7cc5e2b..313b021e 100644 --- a/ragel/cdfflat.cpp +++ b/ragel/cdfflat.cpp @@ -161,7 +161,6 @@ std::ostream &FFlatCodeGen::TRANS_ACTIONS() transPtrs[trans->id] = trans; /* Keep a count of the num of items in the array written. */ - int totalAct = 0; for ( int t = 0; t < redFsm->transSet.length(); t++ ) { /* Write the function for the transition. */ RedTransAp *trans = transPtrs[t]; @@ -180,7 +179,6 @@ std::ostream &FFlatCodeGen::TO_STATE_ACTIONS() taTSA.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ TO_STATE_ACTION( taTSA, st ); @@ -197,7 +195,6 @@ std::ostream &FFlatCodeGen::FROM_STATE_ACTIONS() taFSA.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ FROM_STATE_ACTION( taFSA, st ); @@ -214,7 +211,6 @@ std::ostream &FFlatCodeGen::EOF_ACTIONS() taEA.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ EOF_ACTION( taEA, st ); diff --git a/ragel/cdflat.cpp b/ragel/cdflat.cpp index 19eff6c9..bb8ef252 100644 --- a/ragel/cdflat.cpp +++ b/ragel/cdflat.cpp @@ -139,7 +139,7 @@ std::ostream &FlatCodeGen::FLAT_INDEX_OFFSET() taIO.OPEN(); - int totalStateNum = 0, curIndOffset = 0; + int curIndOffset = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write the index offset. */ taIO.VAL( curIndOffset ); @@ -163,7 +163,6 @@ std::ostream &FlatCodeGen::KEY_SPANS() taSP.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write singles length. */ unsigned long long span = 0; @@ -183,7 +182,6 @@ std::ostream &FlatCodeGen::TO_STATE_ACTIONS() taTSA.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ TO_STATE_ACTION( taTSA, st ); @@ -200,7 +198,6 @@ std::ostream &FlatCodeGen::FROM_STATE_ACTIONS() taFSA.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ FROM_STATE_ACTION( taFSA, st ); @@ -217,7 +214,6 @@ std::ostream &FlatCodeGen::EOF_ACTIONS() taEA.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ EOF_ACTION( taEA, st ); @@ -234,7 +230,6 @@ std::ostream &FlatCodeGen::EOF_TRANS() taET.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write any eof action. */ long trans = 0; @@ -257,7 +252,6 @@ std::ostream &FlatCodeGen::COND_KEYS() taCK.OPEN(); - int totalTrans = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Emit just cond low key and cond high key. */ taCK.KEY( st->condLowKey ); @@ -278,7 +272,6 @@ std::ostream &FlatCodeGen::COND_KEY_SPANS() taCSP.OPEN(); - int totalStateNum = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write singles length. */ unsigned long long span = 0; @@ -297,7 +290,6 @@ std::ostream &FlatCodeGen::CONDS() taC.OPEN(); - int totalTrans = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { if ( st->condList != 0 ) { /* Walk the singles. */ @@ -327,7 +319,7 @@ std::ostream &FlatCodeGen::COND_INDEX_OFFSET() taCO.OPEN(); - int totalStateNum = 0, curIndOffset = 0; + int curIndOffset = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Write the index offset. */ taCO.VAL( curIndOffset ); @@ -348,7 +340,6 @@ std::ostream &FlatCodeGen::KEYS() taK.OPEN(); - int totalTrans = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { /* Emit just low key and high key. */ taK.KEY( st->lowKey ); @@ -370,7 +361,6 @@ std::ostream &FlatCodeGen::INDICIES() taI.OPEN(); - int totalTrans = 0; for ( RedStateList::Iter st = redFsm->stateList; st.lte(); st++ ) { if ( st->transList != 0 ) { /* Walk the singles. */ @@ -405,7 +395,6 @@ std::ostream &FlatCodeGen::TRANS_TARGS() transPtrs[trans->id] = trans; /* Keep a count of the num of items in the array written. */ - int totalStates = 0; for ( int t = 0; t < redFsm->transSet.length(); t++ ) { /* Save the position. Needed for eofTargs. */ RedTransAp *trans = transPtrs[t]; @@ -434,7 +423,6 @@ std::ostream &FlatCodeGen::TRANS_ACTIONS() transPtrs[trans->id] = trans; /* Keep a count of the num of items in the array written. */ - int totalAct = 0; for ( int t = 0; t < redFsm->transSet.length(); t++ ) { /* Write the function for the transition. */ RedTransAp *trans = transPtrs[t]; diff --git a/ragel/cdtable.cpp b/ragel/cdtable.cpp index 2a04b249..2e537b95 100644 --- a/ragel/cdtable.cpp +++ b/ragel/cdtable.cpp @@ -581,7 +581,6 @@ std::ostream &TabCodeGen::TRANS_ACTIONS_WI() transPtrs[trans->id] = trans; /* Keep a count of the num of items in the array written. */ - int totalAct = 0; for ( int t = 0; t < redFsm->transSet.length(); t++ ) { /* Write the function for the transition. */ RedTransAp *trans = transPtrs[t]; -- cgit v1.2.1