From 01d7fbe102d9ee5c0f3103226a6be80533eb9f6b Mon Sep 17 00:00:00 2001 From: xie xingguo Date: Sat, 1 Jul 2017 15:20:30 +0800 Subject: [PATCH] common: fix log warnings MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/LogEntry.cc:54:24: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] } else if (level_str == "warn" | level_str == "warning") { ^ /home/jenkins-build/build/workspace/ceph-pull-requests/src/common/LogEntry.cc:56:24: warning: suggest parentheses around comparison in operand of ‘|’ [-Wparentheses] } else if (level_str == "error" | level_str == "err") { Signed-off-by: xie xingguo --- src/common/LogEntry.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc index d0d3e93dd20..d9100fc46a2 100644 --- a/src/common/LogEntry.cc +++ b/src/common/LogEntry.cc @@ -51,9 +51,9 @@ clog_type LogEntry::str_to_level(std::string const &str) return CLOG_INFO; } else if (level_str == "sec") { return CLOG_SEC; - } else if (level_str == "warn" | level_str == "warning") { + } else if (level_str == "warn" || level_str == "warning") { return CLOG_WARN; - } else if (level_str == "error" | level_str == "err") { + } else if (level_str == "error" || level_str == "err") { return CLOG_ERROR; } else { return CLOG_UNKNOWN; -- 2.39.5