From 9d6ccd46b6479dace85616391190b3c1b07491a0 Mon Sep 17 00:00:00 2001 From: Hwankyu Jhun Date: Mon, 3 Jul 2023 07:27:22 +0000 Subject: [PATCH] Fixed the build error using gcc 13 - Fix wrong indentation - Remove unnecessary std::move call Change-Id: I903fa85df87fccb7b0aa74aeccd4c888d26e48c1 Signed-off-by: Hwankyu Jhun --- src/cynara_thread.cc | 2 +- src/debug-port-internal.hh | 1 + src/port-internal.cc | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/cynara_thread.cc b/src/cynara_thread.cc index 7e5b84b..15ccf15 100644 --- a/src/cynara_thread.cc +++ b/src/cynara_thread.cc @@ -47,7 +47,7 @@ CynaraThread::~CynaraThread() { void CynaraThread::ThreadRun() { while (true) { - Job job = std::move(queue_.WaitAndPop()); + Job job = queue_.WaitAndPop(); Job::Type ret = job.Do(); if (ret == Job::Type::Finish) return; diff --git a/src/debug-port-internal.hh b/src/debug-port-internal.hh index 1fb2285..9b68c65 100644 --- a/src/debug-port-internal.hh +++ b/src/debug-port-internal.hh @@ -17,6 +17,7 @@ #ifndef DEBUG_PORT_INTERNAL_HH_ #define DEBUG_PORT_INTERNAL_HH_ +#include #include namespace rpc_port { diff --git a/src/port-internal.cc b/src/port-internal.cc index a937278..5c7d66c 100644 --- a/src/port-internal.cc +++ b/src/port-internal.cc @@ -266,10 +266,10 @@ int Port::Write(const void* buf, unsigned int size, int* sent_bytes) { continue; } - if (errno == EAGAIN || errno == EWOULDBLOCK) - return PORT_STATUS_ERROR_RESOURCE_UNAVAILABLE; + if (errno == EAGAIN || errno == EWOULDBLOCK) + return PORT_STATUS_ERROR_RESOURCE_UNAVAILABLE; - _E("write_socket: ...error fd %d: errno %d\n", fd_, errno); + _E("write_socket: ...error fd: %d, errno: %d", fd_, errno); return PORT_STATUS_ERROR_IO_ERROR; } -- 2.7.4