Cast PERFETTO_TYPE_IDENTIFIER to bool
With https://reviews.llvm.org/D146764, we treat __PRETTY_FUNCTION__ as a string literal for MSVC compatibility. That causes this code on Windows to warn with
implicit conversion turns string literal into bool: 'const char[162]' to 'bool'
Explicitly cast it to a bool.
Bug: chromium:1446708
Change-Id: I65e45d5eaa2bb85b166527106eba71ecd0aa7baa
diff --git a/src/trace_processor/util/interned_message_view.h b/src/trace_processor/util/interned_message_view.h
index 3422b8b..f6a9a13 100644
--- a/src/trace_processor/util/interned_message_view.h
+++ b/src/trace_processor/util/interned_message_view.h
@@ -71,7 +71,9 @@
if (PERFETTO_TYPE_IDENTIFIER &&
strcmp(decoder_type_,
// GCC complains if this arg can be null.
- PERFETTO_TYPE_IDENTIFIER ? PERFETTO_TYPE_IDENTIFIER : "") != 0) {
+ static_cast<bool>(PERFETTO_TYPE_IDENTIFIER)
+ ? PERFETTO_TYPE_IDENTIFIER
+ : "") != 0) {
PERFETTO_FATAL(
"Interning entry accessed under different types! previous type: "
"%s. new type: %s.",