Skip to content

Commit 99cb17a

Browse files
Fix bugprone-unused-return-value clang-tidy warning (#6934)
1 parent 8fd8d0c commit 99cb17a

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ Checks: >
1717
-bugprone-incorrect-enable-if,
1818
-bugprone-switch-missing-default-case,
1919
-bugprone-empty-catch,
20-
-bugprone-unused-return-value,
2120
-clang-analyzer-*,
2221
-clang-diagnostic-deprecated-declarations,
2322
-clang-diagnostic-constant-conversion,

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
- NodeJS:
2525
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
2626
- Misc:
27+
- FIXED: Fix bugprone-unused-return-value clang-tidy warning. [#6934](https://github.com/Project-OSRM/osrm-backend/pull/6934)
2728
- FIXED: Fix performance-noexcept-move-constructor clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6933)
2829
- FIXED: Fix performance-noexcept-swap clang-tidy warning. [#6931](https://github.com/Project-OSRM/osrm-backend/pull/6931)
2930
- CHANGED: Use custom struct instead of std::pair in QueryHeap. [#6921](https://github.com/Project-OSRM/osrm-backend/pull/6921)

src/server/connection.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ void Connection::handle_timeout(boost::system::error_code ec)
186186
if (ec != boost::asio::error::operation_aborted)
187187
{
188188
boost::system::error_code ignore_error;
189+
// NOLINTNEXTLINE(bugprone-unused-return-value)
189190
TCP_socket.cancel(ignore_error);
190191
handle_shutdown();
191192
}
@@ -197,6 +198,7 @@ void Connection::handle_shutdown()
197198
timer.cancel();
198199
// Initiate graceful connection closure.
199200
boost::system::error_code ignore_error;
201+
// NOLINTNEXTLINE(bugprone-unused-return-value)
200202
TCP_socket.shutdown(boost::asio::ip::tcp::socket::shutdown_both, ignore_error);
201203
}
202204

0 commit comments

Comments
 (0)