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
12 changed files with 103 additions and 102 deletions

View File

@@ -371,7 +371,7 @@ void Module::Interface::Write(Kernel::HLERequestContext& ctx) {
buffer);
}
const u32 bytes_written = static_cast<u32>(
[[maybe_unused]] const u32 bytes_written = static_cast<u32>(
session_data->file->Write(0, buffer.size(), true, buffer.data()).Unwrap());
session_data->file->Close();
@@ -433,7 +433,7 @@ void Module::Interface::WriteMessage(Kernel::HLERequestContext& ctx) {
msg_header.sender_id, msg_header.sender_id2, msg_header.send_count,
msg_header.forward_count, msg_header.user_data);
const u32 bytes_written =
[[maybe_unused]] const u32 bytes_written =
static_cast<u32>(message->Write(0, buffer_size, true, buffer.data()).Unwrap());
message->Close();
@@ -520,7 +520,7 @@ void Module::Interface::WriteMessageWithHMAC(Kernel::HLERequestContext& ctx) {
hmac.CalculateDigest(hmac_digest.data(), message_body.data(), msg_header.body_size);
std::memcpy(buffer.data() + hmac_offset, hmac_digest.data(), hmac_size);
const u32 bytes_written =
[[maybe_unused]] const u32 bytes_written =
static_cast<u32>(message->Write(0, buffer_size, true, buffer.data()).Unwrap());
message->Close();
@@ -763,7 +763,7 @@ void Module::Interface::OpenAndWrite(Kernel::HLERequestContext& ctx) {
cecd->CheckAndUpdateFile(path_type, ncch_program_id, buffer);
}
const u32 bytes_written =
[[maybe_unused]] const u32 bytes_written =
static_cast<u32>(file->Write(0, buffer.size(), true, buffer.data()).Unwrap());
file->Close();