Improve nodiscard adoption for OSAL call sites#271
Improve nodiscard adoption for OSAL call sites#271thatguysumeetkumar-code wants to merge 2 commits into
Conversation
Signed-off-by: Sumitkumar Satpute <sumitkumar.sa.satpute@bti.bmwgroup.com>
License Check Results🚀 The license check job ran with the Bazel command: bazel run --lockfile_mode=error //:license-checkStatus: Click to expand output |
|
The created documentation from the pull request is available at: docu-html |
a6accab to
ede768e
Compare
a44ab1a to
536e399
Compare
| void initIpc() | ||
| { | ||
| ipcServer.init(makeUniqueIpcName()); | ||
| static_cast<void>(ipcServer.init(makeUniqueIpcName())); |
There was a problem hiding this comment.
I think ASSERT_TRUE would be nice here
There was a problem hiding this comment.
If I understood correctly ASSERT_TRUE(ipcServer.init(makeUniqueIpcName()) == ifappl::CheckpointIpcServer::EIpcInitResult::kOk) << "CheckpointIpcServer init failed";
| ipc_channel_ = score::lcm::internal::ControlClientChannel::initializeControlClientChannel(); | ||
|
|
||
| ipc_request_semaphore_.init(1U, false); | ||
| static_cast<void>(ipc_request_semaphore_.init(1U, false)); |
There was a problem hiding this comment.
Would it make sense to assert here? otherwise we are in an undefined state
There was a problem hiding this comment.
If I understood correctly const auto init_result = ipc_request_semaphore_.init(1U, false); assert((score::lcm::internal::osal::OsalReturnType::kSuccess == init_result) && "ControlClient semaphore initialization failed");
There was a problem hiding this comment.
Actually there are baselibs asserts, think we should be using it SCORE_LANGUAGE_FUTURECPP_ASSERT_PRD_MESSAGE since this would be useful info for user. https://github.com/eclipse-score/baselibs/blob/866daca52e8d886a04628be138800d103a5c015b/score/language/futurecpp/include/score/assert.hpp
536e399 to
173b71a
Compare
-use assert and ASSERT_TRUE safeguards Signed-off-by: Sumitkumar Satpute sumitkumar.sa.satpute@bti.bmwgroup.com
173b71a to
0fdd7fb
Compare
Fix the issue : #215
Improvement using [[nodiscrd]] for OSAL return types.