From 40b73c646e2da0fe81c89a33252e138e31f16a31 Mon Sep 17 00:00:00 2001 From: Peter Kasting Date: Mon, 18 Oct 2021 20:14:11 +0000 Subject: [PATCH] Fix an unused variable warning on Android. Bug: chromium:1203071 Change-Id: Iebd5443626f5dbfafc4e01c77190b67d1ef5f7aa Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66800 Commit-Queue: Peter Kasting Commit-Queue: Corentin Wallez Auto-Submit: Peter Kasting Reviewed-by: Corentin Wallez --- src/common/Log.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/Log.cpp b/src/common/Log.cpp index 04aeb08a95..98b4b2bb68 100644 --- a/src/common/Log.cpp +++ b/src/common/Log.cpp @@ -76,15 +76,15 @@ namespace dawn { const char* severityName = SeverityName(mSeverity); +#if defined(DAWN_PLATFORM_ANDROID) + android_LogPriority androidPriority = AndroidLogPriority(mSeverity); + __android_log_print(androidPriority, "Dawn", "%s: %s\n", severityName, fullMessage.c_str()); +#else // defined(DAWN_PLATFORM_ANDROID) FILE* outputStream = stdout; if (mSeverity == LogSeverity::Warning || mSeverity == LogSeverity::Error) { outputStream = stderr; } -#if defined(DAWN_PLATFORM_ANDROID) - android_LogPriority androidPriority = AndroidLogPriority(mSeverity); - __android_log_print(androidPriority, "Dawn", "%s: %s\n", severityName, fullMessage.c_str()); -#else // defined(DAWN_PLATFORM_ANDROID) // Note: we use fprintf because includes static initializers. fprintf(outputStream, "%s: %s\n", severityName, fullMessage.c_str()); fflush(outputStream);