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

Side by Side Diff: base/logging.cc

Issue 315323002: Disable Warning 4702 for the PGO builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address Brett's comment. Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/logging.h" 5 #include "base/logging.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <io.h> 8 #include <io.h>
9 #include <windows.h> 9 #include <windows.h>
10 typedef HANDLE FileHandle; 10 typedef HANDLE FileHandle;
(...skipping 519 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 int ctr) 530 int ctr)
531 : severity_(severity), file_(file), line_(line) { 531 : severity_(severity), file_(file), line_(line) {
532 Init(file, line); 532 Init(file, line);
533 } 533 }
534 534
535 LogMessage::LogMessage(const char* file, int line) 535 LogMessage::LogMessage(const char* file, int line)
536 : severity_(LOG_INFO), file_(file), line_(line) { 536 : severity_(LOG_INFO), file_(file), line_(line) {
537 Init(file, line); 537 Init(file, line);
538 } 538 }
539 539
540 #if defined(OS_WIN)
541 // Disable warning C4702 ("unreachable code") until we fix crbug.com/380175.
542 // TODO(scottmg|sebmarchand): Remove this pragma once the bug is fixed.
543 #pragma warning(push)
544 #pragma warning(disable: 4702)
545 #endif
546 LogMessage::LogMessage(const char* file, int line, LogSeverity severity) 540 LogMessage::LogMessage(const char* file, int line, LogSeverity severity)
547 : severity_(severity), file_(file), line_(line) { 541 : severity_(severity), file_(file), line_(line) {
548 Init(file, line); 542 Init(file, line);
549 } 543 }
550 #if defined(OS_WIN)
551 #pragma warning(pop)
552 #endif
553 544
554 LogMessage::LogMessage(const char* file, int line, std::string* result) 545 LogMessage::LogMessage(const char* file, int line, std::string* result)
555 : severity_(LOG_FATAL), file_(file), line_(line) { 546 : severity_(LOG_FATAL), file_(file), line_(line) {
556 Init(file, line); 547 Init(file, line);
557 stream_ << "Check failed: " << *result; 548 stream_ << "Check failed: " << *result;
558 delete result; 549 delete result;
559 } 550 }
560 551
561 LogMessage::LogMessage(const char* file, int line, LogSeverity severity, 552 LogMessage::LogMessage(const char* file, int line, LogSeverity severity,
562 std::string* result) 553 std::string* result)
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 return *log_file_name; 830 return *log_file_name;
840 return std::wstring(); 831 return std::wstring();
841 } 832 }
842 #endif 833 #endif
843 834
844 } // namespace logging 835 } // namespace logging
845 836
846 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) { 837 std::ostream& operator<<(std::ostream& out, const wchar_t* wstr) {
847 return out << base::WideToUTF8(std::wstring(wstr)); 838 return out << base::WideToUTF8(std::wstring(wstr));
848 } 839 }
OLDNEW
« no previous file with comments | « no previous file | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698