Skip to content

Commit a627536

Browse files
committed
Fix rebase issues and warnings on latest msvc
1 parent 9164cbd commit a627536

File tree

4 files changed

+59
-57
lines changed

4 files changed

+59
-57
lines changed

.clang-tidy

Lines changed: 51 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,56 @@
11
---
22
Checks: '*,
3-
clang-analyzer-*,
4-
clang-diagnostic-*,
5-
-abseil-*,
6-
-altera-*,
7-
-android-*,
8-
-boost-use-ranges,
9-
-bugprone-branch-clone,
10-
-bugprone-easily-swappable-parameters,
11-
-bugprone-suspicious-include,
12-
-clang-analyzer-alpha.core.CastToStruct,
13-
-clang-analyzer-alpha.deadcode.UnreachableCode,
14-
-clang-analyzer-alpha*,
15-
-clang-analyzer-core.CallAndMessage,
16-
-clang-analyzer-core.NonNullParamChecker,
17-
-clang-analyzer-cplusplus.NewDeleteLeaks,
18-
-clang-analyzer-optin.core.EnumCastOutOfRange,
19-
-clang-diagnostic-gnu-zero-variadic-macro-arguments,
20-
-cppcoreguidelines-*,
21-
-fuchsia-*,
22-
-google-*,
23-
-hicpp-*,
24-
-llvm-*,
25-
-llvm-include-order,
26-
-llvm-namespace-comment,
27-
-llvmlibc-*,
28-
-misc-include-cleaner,
29-
-misc-no-recursion,
30-
-misc-non-private-member-variables-in-classes,
31-
-modernize-loop-convert,
32-
-modernize-pass-by-value,
33-
-modernize-raw-string-literal,
34-
-modernize-return-braced-init-list,
35-
-modernize-use-bool-literals,
36-
-modernize-use-default-member-init,
37-
-modernize-use-default,
38-
-modernize-use-emplace,
39-
-modernize-use-equals-default,
40-
-modernize-use-override,
41-
-modernize-use-trailing-return-type,
42-
-modernize-use-using,
43-
-readability-braces-around-statements,
44-
-readability-else-after-return,
45-
-readability-function-cognitive-complexity,
46-
-readability-identifier-length,
47-
-readability-implicit-bool-cast,
48-
-readability-implicit-bool-conversion,
49-
-readability-magic-numbers,
50-
-readability-named-parameter,
51-
-readability-qualified-auto,
52-
-readability-uppercase-literal-suffix,
53-
-readabilty-namespace-comments'
3+
clang-analyzer-*,
4+
clang-diagnostic-*,
5+
-abseil-*,
6+
-altera-*,
7+
-android-*,
8+
-boost-use-ranges,
9+
-bugprone-branch-clone,
10+
-bugprone-easily-swappable-parameters,
11+
-bugprone-suspicious-include,
12+
-clang-analyzer-alpha.core.CastToStruct,
13+
-clang-analyzer-alpha.deadcode.UnreachableCode,
14+
-clang-analyzer-alpha*,
15+
-clang-analyzer-core.CallAndMessage,
16+
-clang-analyzer-core.NonNullParamChecker,
17+
-clang-analyzer-cplusplus.NewDeleteLeaks,
18+
-clang-analyzer-optin.core.EnumCastOutOfRange,
19+
-clang-diagnostic-gnu-zero-variadic-macro-arguments,
20+
-cppcoreguidelines-*,
21+
-fuchsia-*,
22+
-google-*,
23+
-hicpp-*,
24+
-llvm-*,
25+
-llvm-include-order,
26+
-llvm-namespace-comment,
27+
-llvmlibc-*,
28+
-misc-include-cleaner,
29+
-misc-no-recursion,
30+
-misc-non-private-member-variables-in-classes,
31+
-modernize-loop-convert,
32+
-modernize-pass-by-value,
33+
-modernize-raw-string-literal,
34+
-modernize-return-braced-init-list,
35+
-modernize-use-bool-literals,
36+
-modernize-use-default-member-init,
37+
-modernize-use-default,
38+
-modernize-use-emplace,
39+
-modernize-use-equals-default,
40+
-modernize-use-override,
41+
-modernize-use-trailing-return-type,
42+
-modernize-use-using,
43+
-readability-braces-around-statements,
44+
-readability-else-after-return,
45+
-readability-function-cognitive-complexity,
46+
-readability-identifier-length,
47+
-readability-implicit-bool-cast,
48+
-readability-implicit-bool-conversion,
49+
-readability-magic-numbers,
50+
-readability-named-parameter,
51+
-readability-qualified-auto,
52+
-readability-uppercase-literal-suffix,
53+
-readabilty-namespace-comments'
5454
WarningsAsErrors: ''
5555
CheckOptions:
5656
- key: cert-oop11-cpp.UseCERTSemantics

src/KDNetwork/tcp_server.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ void TcpServer::onIncomingConnection()
334334
}
335335
return; // Wait for next incoming connection
336336
}
337+
338+
// Creating a socket for the new connection
339+
auto newSocket = std::make_unique<TcpSocket>(static_cast<int>(clientFd), Socket::State::Connected);
337340
#else
338341
const int clientFd = accept(m_listeningFd, reinterpret_cast<struct sockaddr *>(&clientAddr), &clientAddrLen);
339342
if (clientFd < 0) {
@@ -343,10 +346,10 @@ void TcpServer::onIncomingConnection()
343346
}
344347
return; // Wait for next incoming connection
345348
}
346-
#endif
347349

348350
// Creating a socket for the new connection
349351
auto newSocket = std::make_unique<TcpSocket>(clientFd, Socket::State::Connected);
352+
#endif
350353

351354
// Call the callback with the new socket
352355
if (m_newConnectionCallback) {

tests/auto/foundation/event_queue/tst_event_queue.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ static_assert(!std::is_copy_assignable<EventQueue>{});
2828
static_assert(!std::is_move_constructible<EventQueue>{});
2929
static_assert(!std::is_move_assignable<EventQueue>{});
3030

31-
namespace {
3231
class MyEvent : public Event
3332
{
3433
public:

tests/auto/network/tcp_socket/tst_tcp_socket.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -313,13 +313,13 @@ class TestTcpServer
313313
socklen_t addrLen = sizeof(clientAddr);
314314

315315
#if defined(KD_PLATFORM_WIN32)
316-
const auto clientFd = accept(m_socket.socketFileDescriptor(),
317-
reinterpret_cast<struct sockaddr *>(&clientAddr),
318-
&addrLen);
316+
const SOCKET clientFd = accept(m_socket.socketFileDescriptor(),
317+
reinterpret_cast<struct sockaddr *>(&clientAddr),
318+
&addrLen);
319319

320320
if (clientFd != INVALID_SOCKET) {
321321
// Create a new client socket using the accepted file descriptor
322-
auto clientSocket = std::make_unique<TcpSocket>(clientFd, Socket::State::Connected);
322+
auto clientSocket = std::make_unique<TcpSocket>(static_cast<int>(clientFd), Socket::State::Connected);
323323

324324
// Store the client socket and notify
325325
TcpSocket *rawPtr = clientSocket.get();

0 commit comments

Comments
 (0)