From: Jonathan Kron Date: Wed, 14 Jun 2017 15:46:15 +0000 (-0700) Subject: Fixing opt-asan/ubsan fail for folly contbuild X-Git-Tag: v2017.06.19.00~25 X-Git-Url: http://plrg.eecs.uci.edu/git/?p=folly.git;a=commitdiff_plain;h=5086391b848c323f58920b349937b9f91f92a6be;ds=sidebyside Fixing opt-asan/ubsan fail for folly contbuild Summary: Flag caused compilation error on unused param, asserts optimized out in opt-asan/ubsan builds. Replaced with DCHECK as per meyering's advice. Reviewed By: meyering Differential Revision: D5246089 fbshipit-source-id: dc0abda91f900dd98af31410f4667c52404997f5 --- diff --git a/folly/experimental/logging/LogStreamProcessor.cpp b/folly/experimental/logging/LogStreamProcessor.cpp index e70df787..84c8e0d6 100644 --- a/folly/experimental/logging/LogStreamProcessor.cpp +++ b/folly/experimental/logging/LogStreamProcessor.cpp @@ -42,7 +42,7 @@ void LogStreamProcessor::operator&(LogStream&& stream) noexcept { // no streaming arguments were supplied to the logging macro. // Therefore we don't bother calling extractMessageString(stream), // and just directly use message_. - assert(stream.empty()); + DCHECK(stream.empty()); category_->processMessage(LogMessage{ category_, level_, filename_, lineNumber_, std::move(message_)});