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

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

Issue 1514253002: Fix -Wformat error in Win-Clang build (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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 | no next file » | 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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 #include "webrtc/base/event_tracer.h" 10 #include "webrtc/base/event_tracer.h"
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 } 114 }
115 for (const TraceEvent& e : events) { 115 for (const TraceEvent& e : events) {
116 fprintf(output_file_, 116 fprintf(output_file_,
117 "%s{ \"name\": \"%s\"" 117 "%s{ \"name\": \"%s\""
118 ", \"cat\": \"%s\"" 118 ", \"cat\": \"%s\""
119 ", \"ph\": \"%c\"" 119 ", \"ph\": \"%c\""
120 ", \"ts\": %" PRIu64 120 ", \"ts\": %" PRIu64
121 ", \"pid\": %d" 121 ", \"pid\": %d"
122 ", \"tid\": %d}\n", 122 ", \"tid\": %d}\n",
123 has_logged_event ? "," : " ", e.name, e.category_enabled, 123 has_logged_event ? "," : " ", e.name, e.category_enabled,
124 e.phase, e.timestamp, e.pid, e.tid); 124 e.phase, e.timestamp, static_cast<int>(e.pid), e.tid);
125 has_logged_event = true; 125 has_logged_event = true;
126 } 126 }
127 if (shutting_down) 127 if (shutting_down)
128 break; 128 break;
129 } 129 }
130 fprintf(output_file_, "]}\n"); 130 fprintf(output_file_, "]}\n");
131 if (output_file_owned_) 131 if (output_file_owned_)
132 fclose(output_file_); 132 fclose(output_file_);
133 output_file_ = nullptr; 133 output_file_ = nullptr;
134 } 134 }
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 RTC_DCHECK(old_logger); 256 RTC_DCHECK(old_logger);
257 RTC_CHECK(rtc::AtomicOps::CompareAndSwapPtr( 257 RTC_CHECK(rtc::AtomicOps::CompareAndSwapPtr(
258 &g_event_logger, old_logger, 258 &g_event_logger, old_logger,
259 static_cast<EventLogger*>(nullptr)) == old_logger); 259 static_cast<EventLogger*>(nullptr)) == old_logger);
260 delete old_logger; 260 delete old_logger;
261 webrtc::SetupEventTracer(nullptr, nullptr); 261 webrtc::SetupEventTracer(nullptr, nullptr);
262 } 262 }
263 263
264 } // namespace tracing 264 } // namespace tracing
265 } // namespace rtc 265 } // namespace rtc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698