Fixup unused function and variable.
This CL fixes build issues seen on the fuzzers when they disable
logging.
Bug: chromium:1337052
Change-Id: I91f6853a7550ccbffb924a5fb65cd89086f78853
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94241
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
diff --git a/src/dawn/common/Log.cpp b/src/dawn/common/Log.cpp
index 2119722..265d156 100644
--- a/src/dawn/common/Log.cpp
+++ b/src/dawn/common/Log.cpp
@@ -28,6 +28,7 @@
namespace {
+#if !defined(DAWN_DISABLE_LOGGING)
const char* SeverityName(LogSeverity severity) {
switch (severity) {
case LogSeverity::Debug:
@@ -43,6 +44,7 @@
return "";
}
}
+#endif
#if DAWN_PLATFORM_IS(ANDROID)
android_LogPriority AndroidLogPriority(LogSeverity severity) {
@@ -72,6 +74,7 @@
#if defined(DAWN_DISABLE_LOGGING)
LogMessage::~LogMessage() {
+ (void)mSeverity;
// Don't print logs to make fuzzing more efficient. Implemented as
// an early return to avoid warnings about unused member variables.
return;