Log: Fix unused variable warnings when DAWN_DISABLE_LOGGING
Bug: chromium:1337052 Change-Id: I86df0a26af345630905b4ee94c03bbac60504474 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94100 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
e6882752ce
commit
65d61d76a3
|
@ -70,12 +70,14 @@ LogMessage::LogMessage(LogMessage&& other) = default;
|
||||||
|
|
||||||
LogMessage& LogMessage::operator=(LogMessage&& other) = default;
|
LogMessage& LogMessage::operator=(LogMessage&& other) = default;
|
||||||
|
|
||||||
LogMessage::~LogMessage() {
|
|
||||||
#if defined(DAWN_DISABLE_LOGGING)
|
#if defined(DAWN_DISABLE_LOGGING)
|
||||||
|
LogMessage::~LogMessage() {
|
||||||
// Don't print logs to make fuzzing more efficient. Implemented as
|
// Don't print logs to make fuzzing more efficient. Implemented as
|
||||||
// an early return to avoid warnings about unused member variables.
|
// an early return to avoid warnings about unused member variables.
|
||||||
return;
|
return;
|
||||||
#endif
|
}
|
||||||
|
#else // defined(DAWN_DISABLE_LOGGING)
|
||||||
|
LogMessage::~LogMessage() {
|
||||||
std::string fullMessage = mStream.str();
|
std::string fullMessage = mStream.str();
|
||||||
|
|
||||||
// If this message has been moved, its stream is empty.
|
// If this message has been moved, its stream is empty.
|
||||||
|
@ -99,6 +101,7 @@ LogMessage::~LogMessage() {
|
||||||
fflush(outputStream);
|
fflush(outputStream);
|
||||||
#endif // DAWN_PLATFORM_IS(ANDROID)
|
#endif // DAWN_PLATFORM_IS(ANDROID)
|
||||||
}
|
}
|
||||||
|
#endif // defined(DAWN_DISABLE_LOGGING)
|
||||||
|
|
||||||
LogMessage DebugLog() {
|
LogMessage DebugLog() {
|
||||||
return LogMessage(LogSeverity::Debug);
|
return LogMessage(LogSeverity::Debug);
|
||||||
|
|
Loading…
Reference in New Issue