Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fix build failures when ENABLE_LOG=OFF #2531

Merged
merged 1 commit into from
Aug 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,9 @@ void PutFileRequest::Run() {
return;
}
const std::string full_path = file_path + "/" + sync_file_name_;
const size_t bin_data_size = binary_data.size();

if ((*message_)[strings::msg_params].keyExists(strings::crc32_check_sum)) {
LOG4CXX_TRACE(logger_, "Binary Data Size: " << bin_data_size);
LOG4CXX_TRACE(logger_, "Binary Data Size: " << binary_data.size());
const uint32_t crc_received =
(*message_)[strings::msg_params][strings::crc32_check_sum].asUInt();
LOG4CXX_TRACE(logger_, "CRC32 SUM Received: " << crc_received);
Expand All @@ -232,7 +231,7 @@ void PutFileRequest::Run() {
}

LOG4CXX_DEBUG(logger_,
"Writing " << bin_data_size << " bytes to " << full_path
"Writing " << binary_data.size() << " bytes to " << full_path
<< " (current size is"
<< file_system::FileSize(full_path) << ")");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ app_mngr::CommandSharedPtr VehicleInfoHmiCommandFactory::CreateCommand(
message_type_str = "error response";
}

UNUSED(message_type_str);
LOG4CXX_DEBUG(logger_,
"HMICommandFactory::CreateCommand function_id: "
<< function_id << ", message type: " << message_type_str);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ app_mngr::CommandSharedPtr VehicleInfoMobileCommandFactory::CreateCommand(
message_type_str = "notification";
}

UNUSED(message_type_str);
LOG4CXX_DEBUG(logger_,
"HMICommandFactory::CreateCommand function_id: "
<< function_id << ", message type: " << message_type_str);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ class ApplicationManagerImplTest : public ::testing::Test {
application_manager::MockMessageHelper::message_helper_mock())

{
#ifdef ENABLE_LOG
logger::create_log_message_loop_thread();
#endif
Mock::VerifyAndClearExpectations(mock_message_helper_);
}
~ApplicationManagerImplTest() {
Expand Down
3 changes: 3 additions & 0 deletions src/components/protocol_handler/src/protocol_handler_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
static_cast<int64_t>(
protocol_header_validator_.max_payload_size_by_service_type(
serviceTypeValue)));
UNUSED(mtu_written)
LOG4CXX_DEBUG(logger_,
"MTU parameter was written to bson params: "
<< mtu_written << "; Value: "
Expand All @@ -300,6 +301,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(
// Hash ID is only used in RPC case
const bool hash_written = bson_object_put_int32(
&params, strings::hash_id, static_cast<int32_t>(hash_id));
UNUSED(hash_written);
LOG4CXX_DEBUG(logger_,
"Hash parameter was written to bson params: "
<< hash_written << "; Value: "
Expand All @@ -317,6 +319,7 @@ void ProtocolHandlerImpl::SendStartSessionAck(

const bool protocol_ver_written = bson_object_put_string(
&params, strings::protocol_version, protocolVersionString);
UNUSED(protocol_ver_written);
LOG4CXX_DEBUG(
logger_,
"Protocol version parameter was written to bson params: "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "smart_objects/errors.h"

#include <memory>
#include <vector>
#include "utils/macro.h"
#include "utils/semantic_version.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

#include <set>
#include <string>
#include <sstream>
#include <vector>
#include <map>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ IAP2USBEmulationTransportAdapter::IAP2USBEmulationTransportAdapter(
signal_handler_ = threads::CreateThread("iAP signal handler", delegate);
signal_handler_->start();
const auto result = mkfifo(out_signals_channel, mode);
UNUSED(result);
LOG4CXX_DEBUG(logger_, "Out signals channel creation result: " << result);
}

Expand Down Expand Up @@ -123,6 +124,7 @@ IAP2USBEmulationTransportAdapter::IAPSignalHandlerDelegate::
IAPSignalHandlerDelegate(IAP2USBEmulationTransportAdapter& adapter)
: adapter_(adapter), run_flag_(true), in_(0) {
const auto result = mkfifo(in_signals_channel, mode);
UNUSED(result);
LOG4CXX_DEBUG(logger_, "In signals channel creation result: " << result);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,7 @@ void PlatformSpecificNetworkInterfaceListener::DumpTable() const {
for (auto it = status_table_.begin(); it != status_table_.end(); ++it) {
const std::string ifname = it->first;
const InterfaceStatus& status = it->second;
UNUSED(status);

LOG4CXX_DEBUG(
logger_,
Expand Down