summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-23 20:29:07 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-23 20:29:07 +0000
commit97d95a83f75cc8f1b9879543f1f9f6ef4f10bb10 (patch)
treefc33aad6f13fa16f948dee6efea2685744a976b5 /base
parent107541ab7e63445e7799f90a9714d2d37a584d3b (diff)
downloadchromium_src-97d95a83f75cc8f1b9879543f1f9f6ef4f10bb10.zip
chromium_src-97d95a83f75cc8f1b9879543f1f9f6ef4f10bb10.tar.gz
chromium_src-97d95a83f75cc8f1b9879543f1f9f6ef4f10bb10.tar.bz2
windows: Fix a few things clang complains about.
No functionality change. BUG=82385 TEST=none Review URL: http://codereview.chromium.org/9200009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118725 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/allocator/allocator_shim.cc4
-rw-r--r--base/file_util_win.cc3
-rw-r--r--base/process_util_win.cc2
-rw-r--r--base/win/sampling_profiler.cc4
4 files changed, 7 insertions, 6 deletions
diff --git a/base/allocator/allocator_shim.cc b/base/allocator/allocator_shim.cc
index 97bbf90..097fff2 100644
--- a/base/allocator/allocator_shim.cc
+++ b/base/allocator/allocator_shim.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 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.
@@ -294,7 +294,7 @@ void SetupSubprocessAllocator() {
buffer[sizeof(buffer) - 1] = '\0';
if (secondary_length || !primary_length) {
- char* secondary_value = secondary_length ? buffer : "TCMALLOC";
+ const char* secondary_value = secondary_length ? buffer : "TCMALLOC";
// Force renderer (or other subprocesses) to use secondary_value.
int ret_val = _putenv_s(primary_name, secondary_value);
DCHECK_EQ(0, ret_val);
diff --git a/base/file_util_win.cc b/base/file_util_win.cc
index d1337a2..eb72afb 100644
--- a/base/file_util_win.cc
+++ b/base/file_util_win.cc
@@ -988,8 +988,9 @@ void MemoryMappedFile::CloseHandles() {
bool HasFileBeenModifiedSince(const FileEnumerator::FindInfo& find_info,
const base::Time& cutoff_time) {
base::ThreadRestrictions::AssertIOAllowed();
+ FILETIME file_time = cutoff_time.ToFileTime();
long result = CompareFileTime(&find_info.ftLastWriteTime, // NOLINT
- &cutoff_time.ToFileTime());
+ &file_time);
return result == 1 || result == 0;
}
diff --git a/base/process_util_win.cc b/base/process_util_win.cc
index 19041cc..ae5ee6a 100644
--- a/base/process_util_win.cc
+++ b/base/process_util_win.cc
@@ -592,7 +592,7 @@ bool WaitForProcessesToExit(const std::wstring& executable_name,
DWORD start_time = GetTickCount();
NamedProcessIterator iter(executable_name, filter);
- while (entry = iter.NextProcessEntry()) {
+ while ((entry = iter.NextProcessEntry())) {
DWORD remaining_wait =
std::max<int64>(0, wait_milliseconds - (GetTickCount() - start_time));
HANDLE process = OpenProcess(SYNCHRONIZE,
diff --git a/base/win/sampling_profiler.cc b/base/win/sampling_profiler.cc
index 400eb63..dd510ac 100644
--- a/base/win/sampling_profiler.cc
+++ b/base/win/sampling_profiler.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 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.
@@ -104,7 +104,7 @@ ProfilerFuncs::ProfilerFuncs()
}
}
-base::LazyInstance<ProfilerFuncs, base::LeakyLazyInstanceTraits<ProfilerFuncs>>
+base::LazyInstance<ProfilerFuncs, base::LeakyLazyInstanceTraits<ProfilerFuncs> >
funcs = LAZY_INSTANCE_INITIALIZER;
} // namespace