Bug 1031395 - Remove a double assignment to "limit" to fix a minor warning found by scan-build, the LLVM/Clang static analyzer. r=ehsan
authorPranav Maddi <pranav.maddi@gmail.com>
Fri, 27 Jun 2014 10:02:00 +0200
changeset 191431 5ad7b9998d789433e9fa3bcf036140ad68f26e43
parent 191430 5dad8fa428ed917d1ed7b9899fa900eee70d6acd
child 191432 39d59ff8a543f62bcc4962aec29abf30bcf6de1d
push id27047
push usercbook@mozilla.com
push dateMon, 30 Jun 2014 13:24:53 +0000
treeherdermozilla-central@7c794981d046 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersehsan
bugs1031395
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1031395 - Remove a double assignment to "limit" to fix a minor warning found by scan-build, the LLVM/Clang static analyzer. r=ehsan
layout/base/nsBidi.cpp
--- a/layout/base/nsBidi.cpp
+++ b/layout/base/nsBidi.cpp
@@ -1447,30 +1447,29 @@ nsresult nsBidi::GetVisualRun(int32_t aR
  */
 bool nsBidi::GetRuns()
 {
   if(mDirection!=NSBIDI_MIXED) {
     /* simple, single-run case - this covers length==0 */
     GetSingleRun(mParaLevel);
   } else /* NSBIDI_MIXED, length>0 */ {
     /* mixed directionality */
-    int32_t length=mLength, limit=length;
+    int32_t length=mLength, limit=mTrailingWSStart;
 
     /*
      * If there are WS characters at the end of the line
      * and the run preceding them has a level different from
      * paraLevel, then they will form their own run at paraLevel (L1).
      * Count them separately.
      * We need some special treatment for this in order to not
      * modify the levels array which a line nsBidi object shares
      * with its paragraph parent and its other line siblings.
      * In other words, for the trailing WS, it may be
      * levels[]!=paraLevel but we have to treat it like it were so.
      */
-    limit=mTrailingWSStart;
     if(limit==0) {
       /* there is only WS on this line */
       GetSingleRun(mParaLevel);
     } else {
       nsBidiLevel *levels=mLevels;
       int32_t i, runCount;
       nsBidiLevel level=NSBIDI_DEFAULT_LTR;   /* initialize with no valid level */