From 9b681eb97469afcc23d487c6d6606c6143b3a32f Mon Sep 17 00:00:00 2001 From: Vitaliy Lyudvichenko Date: Tue, 15 May 2018 21:10:50 +0300 Subject: [PATCH] Suppress compiler warnings. [#CLICKHOUSE-2] --- libs/libdaemon/src/BaseDaemon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/libdaemon/src/BaseDaemon.cpp b/libs/libdaemon/src/BaseDaemon.cpp index e9415f60455..0d2b53fd9bc 100644 --- a/libs/libdaemon/src/BaseDaemon.cpp +++ b/libs/libdaemon/src/BaseDaemon.cpp @@ -949,14 +949,14 @@ void BaseDaemon::initialize(Application & self) * We have to do it before buildLoggers, for errors on logger initialization will be written to these files. * If logger.stderr is specified then stderr will be forcibly redirected to that file. */ - if (!log_path.empty() && is_daemon || config().has("logger.stderr")) + if ((!log_path.empty() && is_daemon) || config().has("logger.stderr")) { std::string stderr_path = config().getString("logger.stderr", log_path + "/stderr"); if (!freopen(stderr_path.c_str(), "a+", stderr)) throw Poco::OpenFileException("Cannot attach stderr to " + stderr_path); } - if (!log_path.empty() && is_daemon || config().has("logger.stdout")) + if ((!log_path.empty() && is_daemon) || config().has("logger.stdout")) { std::string stdout_path = config().getString("logger.stdout", log_path + "/stdout"); if (!freopen(stdout_path.c_str(), "a+", stdout))