SuppressWarnings EnumOrdinal.

This is to fix compile failure following https://chromium-review.googlesource.com/c/chromium/src/+/5901711.

Change-Id: I817813e24c96ec542c0e030e1e2964f8bbd591fc
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364464
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43178}
This commit is contained in:
Jeremy Leconte 2024-10-07 09:36:07 +02:00 committed by WebRTC LUCI CQ
parent bd8bd03cba
commit 0bff76bb8a

View File

@ -106,7 +106,7 @@ public class Logging {
// output. On Android, the output will be directed to Logcat. // output. On Android, the output will be directed to Logcat.
// Note: this function starts collecting the output of the RTC_LOG() macros. // Note: this function starts collecting the output of the RTC_LOG() macros.
// TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression. // TODO(bugs.webrtc.org/8491): Remove NoSynchronizedMethodCheck suppression.
@SuppressWarnings("NoSynchronizedMethodCheck") @SuppressWarnings({"EnumOrdinal", "NoSynchronizedMethodCheck"})
public static synchronized void enableLogToDebugOutput(Severity severity) { public static synchronized void enableLogToDebugOutput(Severity severity) {
if (loggable != null) { if (loggable != null) {
throw new IllegalStateException( throw new IllegalStateException(
@ -117,6 +117,7 @@ public class Logging {
loggingEnabled = true; loggingEnabled = true;
} }
@SuppressWarnings("EnumOrdinal")
public static void log(Severity severity, String tag, String message) { public static void log(Severity severity, String tag, String message) {
if (tag == null || message == null) { if (tag == null || message == null) {
throw new IllegalArgumentException("Logging tag or message may not be null."); throw new IllegalArgumentException("Logging tag or message may not be null.");