From e2657dd7aa2d5a41355f56c8dbb2104c6bf60648 Mon Sep 17 00:00:00 2001 From: Alexander Kornienko Date: Mon, 15 Apr 2013 15:47:34 +0000 Subject: [PATCH] Fix unused variable warning with assertions disabled. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179531 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Format/Format.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Format/Format.cpp b/lib/Format/Format.cpp index f93509e18c..c5e1052ce9 100644 --- a/lib/Format/Format.cpp +++ b/lib/Format/Format.cpp @@ -660,9 +660,10 @@ private: Whitespaces); } TailOffset += Split.first + Split.second; - unsigned OldRemainingLength = RemainingLength; - RemainingLength = Token->getLineLengthAfterSplit(LineIndex, TailOffset); - assert(RemainingLength < OldRemainingLength); + unsigned NewRemainingLength = + Token->getLineLengthAfterSplit(LineIndex, TailOffset); + assert(NewRemainingLength < RemainingLength); + RemainingLength = NewRemainingLength; Penalty += Style.PenaltyExcessCharacter; BreakInserted = true; } -- 2.40.0