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

Unified Diff: cloud_print/service/win/cloud_print_service.cc

Issue 731373002: Enable MSVC warning for unused locals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Another Windows fix Created 6 years, 1 month 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
Index: cloud_print/service/win/cloud_print_service.cc
diff --git a/cloud_print/service/win/cloud_print_service.cc b/cloud_print/service/win/cloud_print_service.cc
index 18d9a198d4ddc876351e470d5b4605bcf46d9182..c1b9601bada8c0411dd399b89fcefeb05fe31d68 100644
--- a/cloud_print/service/win/cloud_print_service.cc
+++ b/cloud_print/service/win/cloud_print_service.cc
@@ -2,7 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+// Work around warning in atlbase.h
+// https://connect.microsoft.com/VisualStudio/feedback/details/1032199/atlbase-h-gives-warning-c4189-when-compiling-with-atl-no-com-support
+#pragma warning(push)
+#pragma warning(disable:4189)
#include <atlbase.h>
+#pragma warning(pop)
#include <security.h>
#include <iomanip>
@@ -334,10 +339,9 @@ class CloudPrintServiceModule
base::FilePath file = user_data_dir.Append(chrome::kServiceStateFileName);
std::string contents;
+ base::ReadFileToString(file, &contents);
ServiceState service_state;
-
- bool is_valid = base::ReadFileToString(file, &contents) &&
- service_state.FromString(contents);
+ service_state.FromString(contents);
std::string proxy_id = service_state.proxy_id();
LOG(INFO) << file.value() << ": " << contents;
« no previous file with comments | « chrome/installer/util/installer_state_unittest.cc ('k') | content/browser/renderer_host/render_widget_host_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698