ams: mark ams::Result [[nodiscard]] (partially complete).
NOTE: This work is not yet fully complete; kernel is done, but it was taking an exceedingly long time to get through libstratosphere. Thus, I've temporarily added -Wno-error=unused-result for libstratosphere/stratosphere. All warnings should be fixed to do the same thing Nintendo does as relevant, but this is taking a phenomenally long time and is not actually the most important work to do, so it can be put off for some time to prioritize other tasks for 21.0.0 support.
This commit is contained in:
@@ -211,6 +211,9 @@ namespace ams::htcs::impl {
|
||||
Result HtcsService::AcceptResults(s32 *out_err, s32 *out_desc, SockAddrHtcs *out_address, u32 task_id, s32 desc) {
|
||||
AMS_UNUSED(out_address);
|
||||
|
||||
/* Wait for the task to complete. */
|
||||
this->WaitTask(task_id);
|
||||
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
s32 ret_desc;
|
||||
@@ -235,10 +238,14 @@ namespace ams::htcs::impl {
|
||||
}
|
||||
|
||||
Result HtcsService::ReceiveSmallResults(s32 *out_err, s64 *out_size, char *buffer, s64 buffer_size, u32 task_id, s32 desc) {
|
||||
AMS_UNUSED(desc);
|
||||
/* Verify the task. */
|
||||
R_TRY(m_rpc_client->VerifyTaskIdWithHandle<rpc::ReceiveSmallTask>(task_id, desc));
|
||||
|
||||
/* Continue the task. */
|
||||
m_rpc_client->ReceiveContinue<rpc::ReceiveSmallTask>(task_id, buffer, buffer_size);
|
||||
static_cast<void>(m_rpc_client->ReceiveContinue<rpc::ReceiveSmallTask>(task_id, buffer, buffer_size));
|
||||
|
||||
/* Wait for the task to complete. */
|
||||
this->WaitTask(task_id);
|
||||
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
@@ -274,7 +281,11 @@ namespace ams::htcs::impl {
|
||||
}
|
||||
|
||||
Result HtcsService::SendSmallResults(s32 *out_err, s64 *out_size, u32 task_id, s32 desc) {
|
||||
AMS_UNUSED(desc);
|
||||
/* Verify the task. */
|
||||
R_TRY(m_rpc_client->VerifyTaskIdWithHandle<rpc::SendSmallTask>(task_id, desc));
|
||||
|
||||
/* Wait for the task to complete. */
|
||||
this->WaitTask(task_id);
|
||||
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
@@ -322,6 +333,9 @@ namespace ams::htcs::impl {
|
||||
/* Verify the task. */
|
||||
R_TRY(m_rpc_client->VerifyTaskIdWithHandle<rpc::SendTask>(task_id, desc));
|
||||
|
||||
/* Wait for the task to complete. */
|
||||
this->WaitTask(task_id);
|
||||
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
R_TRY(m_rpc_client->End<rpc::SendTask>(task_id, std::addressof(err), out_size));
|
||||
@@ -347,6 +361,9 @@ namespace ams::htcs::impl {
|
||||
/* Verify the task. */
|
||||
R_TRY(m_rpc_client->VerifyTaskIdWithHandle<rpc::ReceiveTask>(task_id, desc));
|
||||
|
||||
/* Wait for the task to complete. */
|
||||
this->WaitTask(task_id);
|
||||
|
||||
/* Get the result. */
|
||||
htcs::SocketError err{};
|
||||
s64 recv_size{};
|
||||
@@ -399,6 +416,9 @@ namespace ams::htcs::impl {
|
||||
}
|
||||
|
||||
Result HtcsService::SelectEnd(s32 *out_err, bool *out_empty, Span<int> read_handles, Span<int> write_handles, Span<int> exception_handles, u32 task_id) {
|
||||
/* Wait for the task to complete. */
|
||||
this->WaitTask(task_id);
|
||||
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
bool empty;
|
||||
|
||||
Reference in New Issue
Block a user