mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-03 08:08:39 -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
|
@ -135,6 +135,7 @@ namespace ams::htc::server::rpc {
|
|||
Result HtcmiscRpcServer::ProcessSetTargetNameRequest(const char *name, size_t size, u32 task_id) {
|
||||
/* TODO: we need to use settings::fwdbg::SetSettingsItemValue here, but this will require ams support for set:fd re-enable? */
|
||||
/* Needs some thought. */
|
||||
AMS_UNUSED(name, size, task_id);
|
||||
AMS_ABORT("HtcmiscRpcServer::ProcessSetTargetNameRequest");
|
||||
}
|
||||
|
||||
|
|
|
@ -84,6 +84,7 @@ namespace ams::htc::server::rpc {
|
|||
Result GetEnvironmentVariableTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
/* Validate pre-conditions. */
|
||||
AMS_ASSERT(size >= sizeof(HtcmiscRpcPacket));
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcmiscRpcPacket *>(data);
|
||||
|
@ -182,6 +183,7 @@ namespace ams::htc::server::rpc {
|
|||
Result GetEnvironmentVariableLengthTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
/* Validate pre-conditions. */
|
||||
AMS_ASSERT(size >= sizeof(HtcmiscRpcPacket));
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcmiscRpcPacket *>(data);
|
||||
|
@ -257,6 +259,7 @@ namespace ams::htc::server::rpc {
|
|||
Result RunOnHostTask::CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
/* Validate pre-conditions. */
|
||||
AMS_ASSERT(size >= sizeof(HtcmiscRpcPacket));
|
||||
AMS_UNUSED(size);
|
||||
|
||||
/* Create the packet. */
|
||||
auto *packet = reinterpret_cast<HtcmiscRpcPacket *>(data);
|
||||
|
@ -282,6 +285,10 @@ namespace ams::htc::server::rpc {
|
|||
}
|
||||
|
||||
Result RunOnHostTask::ProcessResponse(const char *data, size_t size) {
|
||||
/* Validate pre-conditions. */
|
||||
AMS_ASSERT(size >= sizeof(HtcmiscRpcPacket));
|
||||
AMS_UNUSED(size);
|
||||
|
||||
this->Complete(reinterpret_cast<const HtcmiscRpcPacket *>(data)->params[0]);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
|
|
@ -360,6 +360,8 @@ namespace ams::htc::server::rpc {
|
|||
|
||||
/* Copy the received data. */
|
||||
AMS_ASSERT(0 <= result_size && result_size <= buffer_size);
|
||||
AMS_UNUSED(buffer_size);
|
||||
|
||||
std::memcpy(buffer, result_buffer, result_size);
|
||||
|
||||
return ResultSuccess();
|
||||
|
|
|
@ -88,18 +88,22 @@ namespace ams::htc::server::rpc {
|
|||
}
|
||||
|
||||
virtual Result ProcessResponse(const char *data, size_t size) {
|
||||
AMS_UNUSED(data, size);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
virtual Result CreateRequest(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(out, data, size, task_id);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
virtual Result ProcessNotification(const char *data, size_t size) {
|
||||
AMS_UNUSED(data, size);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
virtual Result CreateNotification(size_t *out, char *data, size_t size, u32 task_id) {
|
||||
AMS_UNUSED(out, data, size, task_id);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue