mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-02 15:49:48 -04:00
libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
This commit is contained in:
parent
e1fbf27398
commit
7ca83c9d3b
160 changed files with 691 additions and 152 deletions
|
@ -128,6 +128,7 @@ namespace ams::htcs::impl {
|
|||
|
||||
Result HtcsManagerImpl::SendLargeStart(u32 *out_task_id, os::NativeHandle *out_handle, const char **buffers, const s64 *sizes, s32 count, s32 desc, s32 flags) {
|
||||
/* NOTE: Nintendo aborts here, too. */
|
||||
AMS_UNUSED(out_task_id, out_handle, buffers, sizes, count, desc, flags);
|
||||
AMS_ABORT("HtcsManagerImpl::SendLargeStart is not implemented");
|
||||
}
|
||||
|
||||
|
|
|
@ -209,6 +209,8 @@ 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);
|
||||
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
s32 ret_desc;
|
||||
|
@ -233,6 +235,8 @@ 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);
|
||||
|
||||
/* Continue the task. */
|
||||
m_rpc_client->ReceiveContinue<rpc::ReceiveSmallTask>(task_id, buffer, buffer_size);
|
||||
|
||||
|
@ -270,6 +274,7 @@ namespace ams::htcs::impl {
|
|||
}
|
||||
|
||||
Result HtcsService::SendSmallResults(s32 *out_err, s64 *out_size, u32 task_id, s32 desc) {
|
||||
AMS_UNUSED(desc);
|
||||
/* Finish the task. */
|
||||
htcs::SocketError err;
|
||||
R_TRY(m_rpc_client->End<rpc::SendSmallTask>(task_id, std::addressof(err), out_size));
|
||||
|
|
|
@ -52,6 +52,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result AcceptTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -62,6 +64,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result AcceptTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -46,6 +46,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result BindTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -56,6 +58,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result BindTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -44,6 +44,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result CloseTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -54,6 +56,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result CloseTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -46,6 +46,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ConnectTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -56,6 +58,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ConnectTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -48,6 +48,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result FcntlTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -58,6 +60,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result FcntlTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ListenTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -55,6 +57,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ListenTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -51,6 +51,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ReceiveSmallTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -64,6 +66,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ReceiveSmallTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -51,6 +51,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ReceiveTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -61,6 +63,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ReceiveTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
@ -85,6 +89,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ReceiveTask::CreateNotification(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace ams::htcs::impl::rpc {
|
|||
AMS_ASSERT(0 <= write_handle_count && write_handle_count < SocketCountMax);
|
||||
AMS_ASSERT(0 <= exception_handle_count && exception_handle_count < SocketCountMax);
|
||||
AMS_ASSERT(handle_count * static_cast<s64>(sizeof(s32)) == body_size);
|
||||
AMS_UNUSED(handle_count);
|
||||
AMS_UNUSED(handle_count, body_size);
|
||||
|
||||
/* Set our results. */
|
||||
m_err = err;
|
||||
|
@ -106,6 +106,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SelectTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -116,6 +118,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SelectTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Determine the body size. */
|
||||
const auto handle_count = m_read_handle_count + m_write_handle_count + m_exception_handle_count;
|
||||
const s64 body_size = static_cast<s64>(handle_count * sizeof(s32));
|
||||
|
|
|
@ -86,6 +86,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SendSmallTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -96,6 +98,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SendSmallTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Sanity check our size. */
|
||||
AMS_ASSERT(sizeof(HtcsRpcPacket) + this->GetBufferSize() <= size);
|
||||
|
||||
|
|
|
@ -81,6 +81,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SendTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -91,6 +93,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SendTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
@ -115,11 +119,15 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SendTask::ProcessNotification(const char *data, size_t size) {
|
||||
AMS_UNUSED(data, size);
|
||||
|
||||
this->NotifyDataChannelReady();
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result SendTask::CreateNotification(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -45,6 +45,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ShutdownTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -55,6 +57,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result ShutdownTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
|
@ -53,6 +53,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SocketTask::ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Convert the input to a packet. */
|
||||
auto *packet = reinterpret_cast<const HtcsRpcPacket *>(data);
|
||||
|
||||
|
@ -66,6 +68,8 @@ namespace ams::htcs::impl::rpc {
|
|||
}
|
||||
|
||||
Result SocketTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcsRpcPacket *>(data);
|
||||
*packet = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue