summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 17:29:27 +0000
committerevan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-30 17:29:27 +0000
commit40350b13714bed9c76d8bb0991c490b2ee14fe05 (patch)
treeab2c88b3f9f5ba6e179a4547fb6b47bd3a768e95 /base
parent3450c47c2b62b3db03c3d3a873252072baecd40c (diff)
downloadchromium_src-40350b13714bed9c76d8bb0991c490b2ee14fe05.zip
chromium_src-40350b13714bed9c76d8bb0991c490b2ee14fe05.tar.gz
chromium_src-40350b13714bed9c76d8bb0991c490b2ee14fe05.tar.bz2
Minor C++ fixes found by Clang.
In cases where I've added an #include, it's generally due to Clang being more picky about templates being available during expansions. Review URL: http://codereview.chromium.org/1432003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/process_util_posix.cc8
-rw-r--r--base/tuple_unittest.cc4
2 files changed, 7 insertions, 5 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc
index 25428fd..ec5f06c 100644
--- a/base/process_util_posix.cc
+++ b/base/process_util_posix.cc
@@ -221,12 +221,12 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) {
const int fd = static_cast<int>(i);
if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO)
continue;
- InjectiveMultimap::const_iterator i;
- for (i = saved_mapping.begin(); i != saved_mapping.end(); i++) {
- if (fd == i->dest)
+ InjectiveMultimap::const_iterator j;
+ for (j = saved_mapping.begin(); j != saved_mapping.end(); j++) {
+ if (fd == j->dest)
break;
}
- if (i != saved_mapping.end())
+ if (j != saved_mapping.end())
continue;
// Since we're just trying to close anything we can find,
diff --git a/base/tuple_unittest.cc b/base/tuple_unittest.cc
index 65a3757..402394c 100644
--- a/base/tuple_unittest.cc
+++ b/base/tuple_unittest.cc
@@ -3,6 +3,8 @@
// found in the LICENSE file.
#include "base/tuple.h"
+
+#include "base/compiler_specific.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace {
@@ -28,7 +30,7 @@ struct Addz {
} // namespace
TEST(TupleTest, Basic) {
- Tuple0 t0 = MakeTuple();
+ Tuple0 t0 ALLOW_UNUSED = MakeTuple();
Tuple1<int> t1(1);
Tuple2<int, const char*> t2 = MakeTuple(1, static_cast<const char*>("wee"));
Tuple3<int, int, int> t3(1, 2, 3);