diff --git a/.clang-tidy b/.clang-tidy index 0c60e12ef25..1d41cdd58d2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -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, diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b8e85b756a..ad9e06bf9ad 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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) diff --git a/src/server/connection.cpp b/src/server/connection.cpp index c3c07a34098..acaed7ab625 100644 --- a/src/server/connection.cpp +++ b/src/server/connection.cpp @@ -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); }