mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-12 21:30:45 +01:00
Suppress -Wdeprecated-volatile in rtc_base/system_time.cc
Bug: webrtc:14601 Change-Id: Ifb6e0cb372231920108142b5efc076039943581b Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/280442 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Johannes Kron <kron@webrtc.org> Commit-Queue: Björn Terelius <terelius@webrtc.org> Cr-Commit-Position: refs/heads/main@{#38471}
This commit is contained in:
parent
96002fa8da
commit
4fdf8cc67b
1 changed files with 5 additions and 0 deletions
|
@ -69,6 +69,10 @@ int64_t SystemTimeNanos() {
|
|||
#elif defined(WINUWP)
|
||||
ticks = WinUwpSystemTimeNanos();
|
||||
#elif defined(WEBRTC_WIN)
|
||||
// TODO(webrtc:14601): Fix the volatile increment instead of suppressing the
|
||||
// warning.
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wdeprecated-volatile"
|
||||
static volatile LONG last_timegettime = 0;
|
||||
static volatile int64_t num_wrap_timegettime = 0;
|
||||
volatile LONG* last_timegettime_ptr = &last_timegettime;
|
||||
|
@ -87,6 +91,7 @@ int64_t SystemTimeNanos() {
|
|||
// TODO(deadbeef): Calculate with nanosecond precision. Otherwise, we're
|
||||
// just wasting a multiply and divide when doing Time() on Windows.
|
||||
ticks = ticks * kNumNanosecsPerMillisec;
|
||||
#pragma clang diagnostic pop
|
||||
#else
|
||||
#error Unsupported platform.
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue