DescriptionFix -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 #
Messages
Total messages: 10 (5 generated)
|