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

Issue 1514253002: Fix -Wformat error in Win-Clang build (Closed)

Created:
5 years ago by hans
Modified:
5 years ago
CC:
webrtc-reviews_webrtc.org, tterriberry_mozilla.com
Base URL:
https://chromium.googlesource.com/external/webrtc.git@master
Target Ref:
refs/pending/heads/master
Project:
webrtc
Visibility:
Public.

Description

Fix -Wformat error in Win-Clang build rtc::PlatformThreadId is pid_t (32-bit signed int) on Linux and Mac, but DWORD (32-bit unsigned int) on Windows. Using the %d printf specifier is therefore not correct on Windows, and Clang would warn about it: ..\..\third_party\webrtc\base\event_tracer.cc(124,46) : error: format specifies type 'int' but the argument has type 'rtc::PlatformThreadId' (aka 'unsigned long') [-Werror,-Wformat] e.phase, e.timestamp, e.pid, e.tid); ^~~~~ This commit fixes the problem by explicitly casting to int before printing. BUG=82385 Committed: https://chromium.googlesource.com/external/webrtc/+/013e83b31c697c861dec83a4fe78b06e836984dd

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -1 line) Patch
M webrtc/base/event_tracer.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (5 generated)
niklas.enbom
5 years ago (2015-12-11 00:16:31 UTC) #2
niklas.enbom
lgtm On 2015/12/11 00:16:31, niklas.enbom wrote:
5 years ago (2015-12-11 00:16:41 UTC) #3
hans
Please take a look.
5 years ago (2015-12-11 00:16:43 UTC) #5
niklas.enbom
Committed patchset #1 (id:1) manually as 013e83b31c697c861dec83a4fe78b06e836984dd (presubmit successful).
5 years ago (2015-12-11 00:17:10 UTC) #9
commit-bot: I haz the power
5 years ago (2015-12-11 00:17:11 UTC) #10
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/013e83b31c697c861dec83a4fe78b06e836984dd
Cr-Commit-Position: refs/heads/master@{#10982}

Powered by Google App Engine
This is Rietveld 408576698