From c98db2b6963703f104e6677c284f0e1275df12ba Mon Sep 17 00:00:00 2001 From: Jeff Walden Date: Tue, 28 Jun 2016 17:13:22 +0100 Subject: [PATCH] Bug 1282795 - Make a variable DebugOnly, and extract a side effect on that variable from an assertion expression to avoid a clang compiler warning when a side-effectful expression appears in unevaluated context. r=froydnj --HG-- extra : rebase_source : c45b2b2fff55457383b8da86b9b597a5fb60b587 --- js/src/jit/IonAnalysis.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index befc3d5013fd..ea8e14bfb843 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -2866,9 +2866,10 @@ jit::AssertExtendedGraphCoherency(MIRGraph& graph, bool underValueNumberer) AssertDominatorTree(graph); - uint32_t idx = 0; + DebugOnly idx = 0; for (MBasicBlockIterator block(graph.begin()); block != graph.end(); block++) { - MOZ_ASSERT(block->id() == idx++); + MOZ_ASSERT(block->id() == idx); + ++idx; // No critical edges: if (block->numSuccessors() > 1)