From fcb844ee32171e2340162f1ced0e7fdcde7b2b24 Mon Sep 17 00:00:00 2001 From: Primiano Tucci Date: Tue, 3 May 2016 16:56:06 +0200 Subject: Add parentheses to silence clang warning crrev.com/1887033002 introuced a clang warning (see below). This fixes it, so that breakpad can be rolled in chrome, where warnings are always fatal. From: https://build.chromium.org/p/tryserver.chromium.android/builders/android_chromium_gn_compile_dbg/builds/59031/steps/compile%20%28with%20patch%29/logs/stdio FAILED: clang_x64/obj/breakpad/dump_syms/dwarf_cu_to_module.o ../../breakpad/src/common/dwarf_cu_to_module.cc:420:20: error: '&&' within '||' [-Werror,-Wlogical-op-parentheses] if (declaration_ && qualified_name || (unqualified_name && enclosing_name)) { ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~ ~~ ../../breakpad/src/common/dwarf_cu_to_module.cc:420:20: note: place parentheses around the '&&' expression to silence this warning if (declaration_ && qualified_name || (unqualified_name && enclosing_name)) { ^ ( ) R=mark@chromium.org, petrcermak@chromium.org Review URL: https://codereview.chromium.org/1928363002 . --- src/common/dwarf_cu_to_module.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/common/dwarf_cu_to_module.cc') diff --git a/src/common/dwarf_cu_to_module.cc b/src/common/dwarf_cu_to_module.cc index 99a7bf30..479e39b2 100644 --- a/src/common/dwarf_cu_to_module.cc +++ b/src/common/dwarf_cu_to_module.cc @@ -417,7 +417,8 @@ string DwarfCUToModule::GenericDIEHandler::ComputeQualifiedName() { // If this DIE was marked as a declaration, record its names in the // specification table. - if (declaration_ && qualified_name || (unqualified_name && enclosing_name)) { + if ((declaration_ && qualified_name) || + (unqualified_name && enclosing_name)) { Specification spec; if (qualified_name) { spec.qualified_name = *qualified_name; -- cgit v1.2.1