Skip to content

Commit

Permalink
Fixup unused function and variable.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dj2 authored and Dawn LUCI CQ committed Jun 18, 2022
1 parent 0a4e2a1 commit 3f64e38
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/dawn/common/Log.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ namespace dawn {

namespace {

#if !defined(DAWN_DISABLE_LOGGING)
const char* SeverityName(LogSeverity severity) {
switch (severity) {
case LogSeverity::Debug:
Expand All @@ -43,6 +44,7 @@ const char* SeverityName(LogSeverity severity) {
return "";
}
}
#endif

#if DAWN_PLATFORM_IS(ANDROID)
android_LogPriority AndroidLogPriority(LogSeverity severity) {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 3f64e38

Please sign in to comment.