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

Side by Side Diff: webrtc/base/logging.cc

Issue 2358993004: Enable the -Wundef warning for clang (Closed)
Patch Set: rebase Created 4 years, 2 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 | « webrtc/base/logging.h ('k') | webrtc/base/mod_ops_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (file != NULL) 143 if (file != NULL)
144 print_stream_ << "(" << FilenameFromPath(file) << ":" << line << "): "; 144 print_stream_ << "(" << FilenameFromPath(file) << ":" << line << "): ";
145 145
146 if (err_ctx != ERRCTX_NONE) { 146 if (err_ctx != ERRCTX_NONE) {
147 std::ostringstream tmp; 147 std::ostringstream tmp;
148 tmp << "[0x" << std::setfill('0') << std::hex << std::setw(8) << err << "]"; 148 tmp << "[0x" << std::setfill('0') << std::hex << std::setw(8) << err << "]";
149 switch (err_ctx) { 149 switch (err_ctx) {
150 case ERRCTX_ERRNO: 150 case ERRCTX_ERRNO:
151 tmp << " " << strerror(err); 151 tmp << " " << strerror(err);
152 break; 152 break;
153 #if WEBRTC_WIN 153 #ifdef WEBRTC_WIN
154 case ERRCTX_HRESULT: { 154 case ERRCTX_HRESULT: {
155 char msgbuf[256]; 155 char msgbuf[256];
156 DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM; 156 DWORD flags = FORMAT_MESSAGE_FROM_SYSTEM;
157 HMODULE hmod = GetModuleHandleA(module); 157 HMODULE hmod = GetModuleHandleA(module);
158 if (hmod) 158 if (hmod)
159 flags |= FORMAT_MESSAGE_FROM_HMODULE; 159 flags |= FORMAT_MESSAGE_FROM_HMODULE;
160 if (DWORD len = FormatMessageA( 160 if (DWORD len = FormatMessageA(
161 flags, hmod, err, 161 flags, hmod, err,
162 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), 162 MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
163 msgbuf, sizeof(msgbuf) / sizeof(msgbuf[0]), NULL)) { 163 msgbuf, sizeof(msgbuf) / sizeof(msgbuf[0]), NULL)) {
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 } 548 }
549 549
550 if (state) { 550 if (state) {
551 state->unprintable_count_[input] = consecutive_unprintable; 551 state->unprintable_count_[input] = consecutive_unprintable;
552 } 552 }
553 } 553 }
554 554
555 ////////////////////////////////////////////////////////////////////// 555 //////////////////////////////////////////////////////////////////////
556 556
557 } // namespace rtc 557 } // namespace rtc
OLDNEW
« no previous file with comments | « webrtc/base/logging.h ('k') | webrtc/base/mod_ops_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698