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>
This commit is contained in:
dan sinclair 2022-06-18 15:38:00 +00:00 committed by Dawn LUCI CQ
parent 0a4e2a1373
commit 3f64e38ba0
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,7 @@ namespace dawn {
namespace {
#if !defined(DAWN_DISABLE_LOGGING)
const char* SeverityName(LogSeverity severity) {
switch (severity) {
case LogSeverity::Debug:
@ -43,6 +44,7 @@ const char* SeverityName(LogSeverity severity) {
return "";
}
}
#endif
#if DAWN_PLATFORM_IS(ANDROID)
android_LogPriority AndroidLogPriority(LogSeverity severity) {
@ -72,6 +74,7 @@ LogMessage& LogMessage::operator=(LogMessage&& other) = default;
#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;