libstrat: enable -Wextra, -Werror

This caught an embarrassingly large number of bugs.
This commit is contained in:
Michael Scire
2021-10-06 15:20:48 -07:00
parent e1fbf27398
commit 7ca83c9d3b
160 changed files with 691 additions and 152 deletions

View File

@@ -66,11 +66,13 @@ namespace ams::htcs::server {
Result ManagerServiceObject::RegisterProcessId(const sf::ClientProcessId &client_pid) {
/* NOTE: Nintendo does nothing here. */
AMS_UNUSED(client_pid);
return ResultSuccess();
}
Result ManagerServiceObject::MonitorManager(const sf::ClientProcessId &client_pid) {
/* NOTE: Nintendo does nothing here. */
AMS_UNUSED(client_pid);
return ResultSuccess();
}

View File

@@ -19,56 +19,56 @@
namespace ams::htcs::server {
#define AMS_HTCS_MANAGER_DEPRECATED_API() AMS_ABORT("Deprecated IHtcsManager API %s was called.\n", AMS_CURRENT_FUNCTION_NAME)
#define AMS_HTCS_MANAGER_DEPRECATED_API(...) ({ AMS_UNUSED(__VA_ARGS__); AMS_ABORT("Deprecated IHtcsManager API %s was called.\n", AMS_CURRENT_FUNCTION_NAME); })
Result ManagerServiceObject::Socket(sf::Out<s32> out_err, sf::Out<s32> out_sock) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_sock);
}
Result ManagerServiceObject::Close(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, desc);
}
Result ManagerServiceObject::Connect(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, const htcs::SockAddrHtcs &address) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, desc, address);
}
Result ManagerServiceObject::Bind(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, const htcs::SockAddrHtcs &address) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, desc, address);
}
Result ManagerServiceObject::Listen(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, s32 backlog_count) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, desc, backlog_count);
}
Result ManagerServiceObject::Accept(sf::Out<s32> out_err, sf::Out<s32> out_res, sf::Out<htcs::SockAddrHtcs> out_address, s32 desc) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, out_address, desc);
}
Result ManagerServiceObject::Recv(sf::Out<s32> out_err, sf::Out<s64> out_size, const sf::OutBuffer &buffer, s32 desc, s32 flags) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_size, buffer, desc, flags);
}
Result ManagerServiceObject::Send(sf::Out<s32> out_err, sf::Out<s64> out_size, s32 desc, const sf::InBuffer &buffer, s32 flags) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_size, desc, buffer, flags);
}
Result ManagerServiceObject::Shutdown(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, s32 how) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, desc, how);
}
Result ManagerServiceObject::Fcntl(sf::Out<s32> out_err, sf::Out<s32> out_res, s32 desc, s32 command, s32 value) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out_res, desc, command, value);
}
}

View File

@@ -19,11 +19,11 @@
namespace ams::htcs::server {
#define AMS_HTCS_MANAGER_DEPRECATED_API() AMS_ABORT("Deprecated IHtcsManager API %s was called.\n", AMS_CURRENT_FUNCTION_NAME)
#define AMS_HTCS_MANAGER_DEPRECATED_API(...) ({ AMS_UNUSED(__VA_ARGS__); AMS_ABORT("Deprecated IHtcsManager API %s was called.\n", AMS_CURRENT_FUNCTION_NAME); })
Result SocketServiceObject::Accept(sf::Out<s32> out_err, sf::Out<sf::SharedPointer<tma::ISocket>> out, sf::Out<htcs::SockAddrHtcs> out_address) {
/* NOTE: This is a deprecated API, and Nintendo aborts when it is called. */
AMS_HTCS_MANAGER_DEPRECATED_API();
AMS_HTCS_MANAGER_DEPRECATED_API(out_err, out, out_address);
}
}