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}
diff --git a/rtc_base/system_time.cc b/rtc_base/system_time.cc
index d53d923..058e6c2 100644
--- a/rtc_base/system_time.cc
+++ b/rtc_base/system_time.cc
@@ -69,6 +69,10 @@
#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 @@
// 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