libstrat: enable -Wextra, -Werror
This caught an embarrassingly large number of bugs.
This commit is contained in:
@@ -36,6 +36,7 @@ namespace ams::htc::server::driver {
|
||||
|
||||
void HtclowDriver::SetDisconnectionEmulationEnabled(bool en) {
|
||||
/* NOTE: Nintendo ignores the input, here. */
|
||||
AMS_UNUSED(en);
|
||||
m_disconnection_emulation_enabled = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -69,11 +69,13 @@ namespace ams::htc::server {
|
||||
|
||||
Result HtcServiceObject::GetHostConnectionEventForSystem(sf::OutCopyHandle out) {
|
||||
/* NOTE: Nintendo presumably reserved this command in case they need it, but they haven't implemented it yet. */
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("HostEventForSystem not implemented.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::GetHostDisconnectionEventForSystem(sf::OutCopyHandle out) {
|
||||
/* NOTE: Nintendo presumably reserved this command in case they need it, but they haven't implemented it yet. */
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("HostEventForSystem not implemented.");
|
||||
}
|
||||
|
||||
@@ -114,41 +116,49 @@ namespace ams::htc::server {
|
||||
|
||||
Result HtcServiceObject::GetBridgeIpAddress(const sf::OutBuffer &out) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::GetBridgePort(const sf::OutBuffer &out) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::SetCradleAttached(bool attached) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(attached);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::GetBridgeSubnetMask(const sf::OutBuffer &out) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::GetBridgeMacAddress(const sf::OutBuffer &out) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(out);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::SetBridgeIpAddress(const sf::InBuffer &arg) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(arg);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::SetBridgeSubnetMask(const sf::InBuffer &arg) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(arg);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
Result HtcServiceObject::SetBridgePort(const sf::InBuffer &arg) {
|
||||
/* NOTE: Atmosphere does not support HostBridge, and it's unclear if we ever will. */
|
||||
AMS_UNUSED(arg);
|
||||
AMS_ABORT("HostBridge currently not supported.");
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ namespace ams::htc::server {
|
||||
}
|
||||
|
||||
void InitializePowerStateMonitor(htclow::impl::DriverType driver_type, htclow::HtclowManager *htclow_manager) {
|
||||
AMS_UNUSED(driver_type);
|
||||
|
||||
/* Set the htclow manager. */
|
||||
g_htclow_manager = htclow_manager;
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user