summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 23:37:15 +0000
committerrnk@chromium.org <rnk@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-26 23:37:15 +0000
commit206ca337182eaec4287042654d8d1253484ae15c (patch)
tree04846e463835d118ab067c7fb7d143f0cd1cec83
parent8ab01cb74e4f9e92b8eda04475c69ad8752d9dbe (diff)
downloadchromium_src-206ca337182eaec4287042654d8d1253484ae15c.zip
chromium_src-206ca337182eaec4287042654d8d1253484ae15c.tar.gz
chromium_src-206ca337182eaec4287042654d8d1253484ae15c.tar.bz2
Avoid coercing integers to doubles when swapping for bubble sort.
score_ is partially initialized, and while ultimately the uninit elements are not used, coercing them to floating point generates uninit reports when run under drmemory. It's also unecessary, so I'm removing it. BUG=115326 R=jshin@chromium.org,timurrrr@chromium.org TEST=comact_lang_det_unittest_small.cc under drmemory Review URL: http://codereview.chromium.org/9465026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129050 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--third_party/cld/encodings/compact_lang_det/tote.cc4
-rw-r--r--tools/valgrind/drmemory/suppressions_full.txt4
2 files changed, 2 insertions, 6 deletions
diff --git a/third_party/cld/encodings/compact_lang_det/tote.cc b/third_party/cld/encodings/compact_lang_det/tote.cc
index 21087a8..75e5051 100644
--- a/third_party/cld/encodings/compact_lang_det/tote.cc
+++ b/third_party/cld/encodings/compact_lang_det/tote.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -275,7 +275,7 @@ void ToteWithReliability::Sort(int n) {
value_[sub] = value_[sub2];
value_[sub2] = tmpv;
- double tmps = score_[sub];
+ int tmps = score_[sub];
score_[sub] = score_[sub2];
score_[sub2] = tmps;
diff --git a/tools/valgrind/drmemory/suppressions_full.txt b/tools/valgrind/drmemory/suppressions_full.txt
index e684301..ff448dc 100644
--- a/tools/valgrind/drmemory/suppressions_full.txt
+++ b/tools/valgrind/drmemory/suppressions_full.txt
@@ -1163,10 +1163,6 @@ name=http://crbug.com/113847 (2)
*!openDatabase
*!sqlite3_open
-UNINITIALIZED READ
-name=http://crbug.com/115326
-*!ToteWithReliability::Sort
-
# Some unit tests must not be waiting for the file thread after deleting the
# AppNotificationManager.
LEAK