Skip to content

Commit 85b8f11

Browse files
committed
Silence some clang-tidy warnings in tcp socket
1 parent 803b9c5 commit 85b8f11

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/KDNetwork/tcp_socket.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <BaseTsd.h>
1919
typedef SSIZE_T ssize_t;
2020
#else
21-
#include <errno.h>
21+
#include <cerrno>
2222
#include <netdb.h> // For getaddrinfo (used as placeholder)
2323
#include <sys/socket.h> // For getsockopt, SO_ERROR, send flags (MSG_NOSIGNAL)
2424
#include <sys/types.h> // For ssize_t
@@ -88,6 +88,7 @@ TcpSocket::~TcpSocket()
8888
{
8989
}
9090

91+
// NOLINTBEGIN(bugprone-use-after-move)
9192
TcpSocket::TcpSocket(TcpSocket &&other) noexcept
9293
: Socket(std::move(other))
9394
, connected(std::move(other.connected)) // Move the connected signal
@@ -118,6 +119,7 @@ TcpSocket &TcpSocket::operator=(TcpSocket &&other) noexcept
118119
}
119120
return *this;
120121
}
122+
// NOLINTEND(bugprone-use-after-move)
121123

122124
/**
123125
* @brief Connect to a host using a hostname and port
@@ -257,7 +259,6 @@ void TcpSocket::handleDnsLookupCompleted(std::error_code ec, const std::vector<I
257259
}
258260

259261
// Extract connection info
260-
const std::string host = m_pendingConnection->hostname;
261262
const std::uint16_t port = m_pendingConnection->port;
262263

263264
// If lookup failed or no addresses returned

0 commit comments

Comments
 (0)