diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-01-04 17:20:57 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-01-04 17:20:57 -0800 |
commit | 354b32d93817bcf88dcb9117ccb449b534fb5cd2 (patch) | |
tree | bd9486cecd848a73c2d4643005290ff51897970c /src/relooper | |
parent | 0895a9801ef922f4b0655d24eb1569092014eebe (diff) |
fix some relooper compiler warnings and update reftests for previous fixes1.8.3
Diffstat (limited to 'src/relooper')
-rw-r--r-- | src/relooper/Relooper.cpp | 14 | ||||
-rw-r--r-- | src/relooper/test.txt | 4 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/relooper/Relooper.cpp b/src/relooper/Relooper.cpp index de69e0ef..389d7447 100644 --- a/src/relooper/Relooper.cpp +++ b/src/relooper/Relooper.cpp @@ -308,7 +308,7 @@ void MultipleShape::Render(bool InLoop) { } RenderLoopPostfix(); if (Next) Next->Render(InLoop); -}; +} // LoopShape @@ -323,7 +323,7 @@ void LoopShape::Render(bool InLoop) { Indenter::Unindent(); PrintIndented("}\n"); if (Next) Next->Render(InLoop); -}; +} // EmulatedShape @@ -350,7 +350,7 @@ void EmulatedShape::Render(bool InLoop) { Indenter::Unindent(); PrintIndented("}\n"); if (Next) Next->Render(InLoop); -}; +} // Relooper @@ -358,8 +358,8 @@ Relooper::Relooper() : Root(NULL), Emulate(false), BlockIdCounter(1), ShapeIdCou } Relooper::~Relooper() { - for (int i = 0; i < Blocks.size(); i++) delete Blocks[i]; - for (int i = 0; i < Shapes.size(); i++) delete Shapes[i]; + for (unsigned i = 0; i < Blocks.size(); i++) delete Blocks[i]; + for (unsigned i = 0; i < Shapes.size(); i++) delete Shapes[i]; } void Relooper::AddBlock(Block *New) { @@ -399,7 +399,7 @@ void Relooper::Calculate(Block *Entry) { // RAII cleanup. Without splitting, we will be forced to introduce labelled loops to allow // reaching the final block void SplitDeadEnds() { - int TotalCodeSize = 0; + unsigned TotalCodeSize = 0; for (BlockSet::iterator iter = Live.begin(); iter != Live.end(); iter++) { Block *Curr = *iter; TotalCodeSize += strlen(Curr->Code); @@ -451,7 +451,7 @@ void Relooper::Calculate(Block *Entry) { Pre.FindLive(Entry); // Add incoming branches from live blocks, ignoring dead code - for (int i = 0; i < Blocks.size(); i++) { + for (unsigned i = 0; i < Blocks.size(); i++) { Block *Curr = Blocks[i]; if (!contains(Pre.Live, Curr)) continue; for (BlockBranchMap::iterator iter = Curr->BranchesOut.begin(); iter != Curr->BranchesOut.end(); iter++) { diff --git a/src/relooper/test.txt b/src/relooper/test.txt index 540f7bdb..9bdd4093 100644 --- a/src/relooper/test.txt +++ b/src/relooper/test.txt @@ -91,7 +91,7 @@ } default: { var $x_1 = $x_0; - label = -1; + label = 8; break L1; } } @@ -106,7 +106,7 @@ } } } - if (label == -1) { + if (label == 8) { // code 7 } // code 4 |