service: Mark variables as [[maybe_unused]] where applicable (#5318)

Quite a few service functions are stubbed but still pop all their
arguments, which can lead to unused variable warnings.

We can mark the unused arguments with [[maybe_unused]] to silence these
warnings until a full implementation of these functions are made.
This commit is contained in:
Mat M 2020-05-04 06:22:33 -04:00 committed by GitHub
parent 6e48149ee1
commit e9819b61a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 103 additions and 102 deletions

View file

@ -1219,8 +1219,8 @@ void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx, u16 command_id,
void NWM_UDS::ConnectToNetwork(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp(ctx, 0x1E, 2, 4);
u8 connection_type = rp.Pop<u8>();
u32 passphrase_size = rp.Pop<u32>();
const auto connection_type = rp.Pop<u8>();
[[maybe_unused]] const auto passphrase_size = rp.Pop<u32>();
const std::vector<u8> network_info_buffer = rp.PopStaticBuffer();
ASSERT(network_info_buffer.size() == sizeof(NetworkInfo));
@ -1240,8 +1240,8 @@ void NWM_UDS::ConnectToNetworkDeprecated(Kernel::HLERequestContext& ctx) {
// info
const auto network_info_buffer = rp.PopRaw<std::array<u8, 0x3C>>();
u8 connection_type = rp.Pop<u8>();
u32 passphrase_size = rp.Pop<u32>();
const auto connection_type = rp.Pop<u8>();
[[maybe_unused]] const auto passphrase_size = rp.Pop<u32>();
std::vector<u8> passphrase = rp.PopStaticBuffer();