Fix bugprone-unused-return-value clang-tidy warning (#6934)

This commit is contained in:
Siarhei Fedartsou 2024-06-08 14:33:24 +02:00 committed by GitHub
parent 8fd8d0c24a
commit 99cb17aed3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,6 @@ Checks: >
-bugprone-incorrect-enable-if,
-bugprone-switch-missing-default-case,
-bugprone-empty-catch,
-bugprone-unused-return-value,
-clang-analyzer-*,
-clang-diagnostic-deprecated-declarations,
-clang-diagnostic-constant-conversion,

View File

@ -24,6 +24,7 @@
- NodeJS:
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
- Misc:
- FIXED: Fix bugprone-unused-return-value clang-tidy warning. [#6934](https://github.com/Project-OSRM/osrm-backend/pull/6934)
- FIXED: Fix performance-noexcept-move-constructor clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6933)
- FIXED: Fix performance-noexcept-swap clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6931)
- CHANGED: Use custom struct instead of std::pair in QueryHeap. [#6921](https://github.com/Project-OSRM/osrm-backend/pull/6921)

View File

@ -186,6 +186,7 @@ void Connection::handle_timeout(boost::system::error_code ec)
if (ec != boost::asio::error::operation_aborted)
{
boost::system::error_code ignore_error;
// NOLINTNEXTLINE(bugprone-unused-return-value)
TCP_socket.cancel(ignore_error);
handle_shutdown();
}
@ -197,6 +198,7 @@ void Connection::handle_shutdown()
timer.cancel();
// Initiate graceful connection closure.
boost::system::error_code ignore_error;
// NOLINTNEXTLINE(bugprone-unused-return-value)
TCP_socket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignore_error);
}