Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(597)

Unified Diff: net/tools/dump_cache/cache_dumper.cc

Issue 2081007: Enable warning 4389 as an error on windows builds. This will make... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/base/network_change_notifier_win.cc ('k') | net/tools/dump_cache/upgrade.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/dump_cache/cache_dumper.cc
===================================================================
--- net/tools/dump_cache/cache_dumper.cc (revision 48060)
+++ net/tools/dump_cache/cache_dumper.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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.
@@ -89,6 +89,10 @@
#ifdef WIN32_LARGE_FILENAME_SUPPORT
entry_ = CreateFileW(file.c_str(), GENERIC_WRITE|GENERIC_READ, 0, 0,
CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0);
+ if (entry_ == INVALID_HANDLE_VALUE) {
+ wprintf(L"CreateFileW (%s) failed: %d\n", file.c_str(), GetLastError());
+ return false;
+ }
return entry_ != INVALID_HANDLE_VALUE;
#else
entry_ = file_util::OpenFile(entry_path_, "w+");
@@ -184,7 +188,7 @@
#ifdef WIN32_LARGE_FILENAME_SUPPORT
DWORD bytes;
DWORD rv = WriteFile(entry_, data, len, &bytes, 0);
- return rv == TRUE && bytes == len;
+ return rv == TRUE && bytes == static_cast<DWORD>(len);
#else
int bytes = fwrite(data, 1, len, entry_);
return bytes == len;
« no previous file with comments | « net/base/network_change_notifier_win.cc ('k') | net/tools/dump_cache/upgrade.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698