mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-12 05:40:04 +00:00
Chore: Enable warnings as errors on MSVC (#6456)
* tests: add Sanity test for SplitFilename83 fix test fix test * disable `C4715:not all control paths return a value` for nihstro includes nihstro: no warn * Chore: Enable warnings as errors on msvc + fix warnings fixes some more warnings clang-format * more fixes * Externals: Add target_compile_options `/W0` nihstro-headers and ... Revert "disable `C4715:not all control paths return a value` for nihstro includes" This reverts commit 606d79b55d3044b744fb835025b8eb0f4ea5b757. * src\citra\config.cpp: ReadSetting: simplify type casting * settings.cpp: Get*Name: remove superflous logs
This commit is contained in:
parent
055a58f01e
commit
41f13456c0
71 changed files with 397 additions and 294 deletions
|
@ -1197,8 +1197,8 @@ static void CaptureFrameBuffer(Core::System& system, u32 capture_offset, VAddr s
|
|||
auto dst_vaddr = screen_capture_base_vaddr + capture_offset;
|
||||
auto dst_ptr = system.Memory().GetPointer(dst_vaddr);
|
||||
const auto src_ptr = system.Memory().GetPointer(src);
|
||||
for (auto y = 0; y < height; y++) {
|
||||
for (auto x = 0; x < screen_width; x++) {
|
||||
for (u32 y = 0; y < height; y++) {
|
||||
for (u32 x = 0; x < screen_width; x++) {
|
||||
auto dst_offset =
|
||||
VideoCore::GetMortonOffset(x, y, bpp) + (y & ~7) * screen_width_pow2 * bpp;
|
||||
auto src_offset = bpp * (screen_width * y + x);
|
||||
|
|
|
@ -929,7 +929,7 @@ void Module::APTInterface::StoreSysMenuArg(Kernel::HLERequestContext& ctx) {
|
|||
|
||||
void Module::APTInterface::SendCaptureBufferInfo(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x40, 1, 2); // 0x00400042
|
||||
const auto size = rp.Pop<u32>();
|
||||
[[maybe_unused]] const auto size = rp.Pop<u32>();
|
||||
const auto buffer = rp.PopStaticBuffer();
|
||||
|
||||
LOG_DEBUG(Service_APT, "called");
|
||||
|
|
|
@ -855,7 +855,7 @@ ResultVal<u16> FS_USER::GetSpecialContentIndexFromGameCard(u64 title_id, Special
|
|||
case SpecialContentType::DLPChild:
|
||||
return MakeResult(static_cast<u16>(NCSDContentIndex::DLP));
|
||||
default:
|
||||
ASSERT(false);
|
||||
UNREACHABLE();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1424,8 +1424,8 @@ void NWM_UDS::DecryptBeaconData(Kernel::HLERequestContext& ctx, u16 command_id)
|
|||
auto& node = nodes.emplace_back();
|
||||
node.friend_code_seed = info.friend_code_seed;
|
||||
node.network_node_id = info.network_node_id;
|
||||
for (std::size_t i = 0; i < info.username.size(); ++i) {
|
||||
node.username[i] = info.username[i];
|
||||
for (std::size_t j = 0; j < info.username.size(); ++j) {
|
||||
node.username[j] = info.username[j];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ static std::array<u8, CryptoPP::Weak::MD5::DIGESTSIZE> GetDataCryptoCTR(
|
|||
* Generates the key used for encrypting the 802.11 data frames generated by UDS.
|
||||
* @returns The key used for data frames crypto.
|
||||
*/
|
||||
static std::array<u8, CryptoPP::AES::BLOCKSIZE> GenerateDataCCMPKey(
|
||||
[[maybe_unused]] static std::array<u8, CryptoPP::AES::BLOCKSIZE> GenerateDataCCMPKey(
|
||||
const std::vector<u8>& passphrase, const NetworkInfo& network_info) {
|
||||
// Calculate the MD5 hash of the input passphrase.
|
||||
std::array<u8, CryptoPP::Weak::MD5::DIGESTSIZE> passphrase_hash;
|
||||
|
@ -157,11 +157,10 @@ static std::vector<u8> GenerateCCMPAAD(const MacAddress& sender, const MacAddres
|
|||
* Decrypts the payload of an encrypted 802.11 data frame using the specified key.
|
||||
* @returns The decrypted payload.
|
||||
*/
|
||||
static std::vector<u8> DecryptDataFrame(const std::vector<u8>& encrypted_payload,
|
||||
const std::array<u8, CryptoPP::AES::BLOCKSIZE>& ccmp_key,
|
||||
const MacAddress& sender, const MacAddress& receiver,
|
||||
const MacAddress& bssid, u16 sequence_number,
|
||||
u16 frame_control) {
|
||||
[[maybe_unused]] static std::vector<u8> DecryptDataFrame(
|
||||
const std::vector<u8>& encrypted_payload,
|
||||
const std::array<u8, CryptoPP::AES::BLOCKSIZE>& ccmp_key, const MacAddress& sender,
|
||||
const MacAddress& receiver, const MacAddress& bssid, u16 sequence_number, u16 frame_control) {
|
||||
|
||||
// Reference: IEEE 802.11-2007
|
||||
|
||||
|
@ -218,11 +217,10 @@ static std::vector<u8> DecryptDataFrame(const std::vector<u8>& encrypted_payload
|
|||
* Encrypts the payload of an 802.11 data frame using the specified key.
|
||||
* @returns The encrypted payload.
|
||||
*/
|
||||
static std::vector<u8> EncryptDataFrame(const std::vector<u8>& payload,
|
||||
const std::array<u8, CryptoPP::AES::BLOCKSIZE>& ccmp_key,
|
||||
const MacAddress& sender, const MacAddress& receiver,
|
||||
const MacAddress& bssid, u16 sequence_number,
|
||||
u16 frame_control) {
|
||||
[[maybe_unused]] static std::vector<u8> EncryptDataFrame(
|
||||
const std::vector<u8>& payload, const std::array<u8, CryptoPP::AES::BLOCKSIZE>& ccmp_key,
|
||||
const MacAddress& sender, const MacAddress& receiver, const MacAddress& bssid,
|
||||
u16 sequence_number, u16 frame_control) {
|
||||
// Reference: IEEE 802.11-2007
|
||||
|
||||
std::vector<u8> aad = GenerateCCMPAAD(sender, receiver, bssid, frame_control);
|
||||
|
|
|
@ -99,7 +99,7 @@ void PLG_LDR::OnProcessRun(Kernel::Process& process, Kernel::KernelSystem& kerne
|
|||
plugin_root + fmt::format("{:016X}", process.codeset->program_id);
|
||||
FileUtil::FSTEntry entry;
|
||||
FileUtil::ScanDirectoryTree(plugin_tid, entry);
|
||||
for (const auto child : entry.children) {
|
||||
for (const auto& child : entry.children) {
|
||||
if (!child.isDirectory && child.physicalName.ends_with(".3gx")) {
|
||||
plgldr_context.is_default_path = false;
|
||||
plgldr_context.plugin_path = child.physicalName;
|
||||
|
|
|
@ -794,8 +794,6 @@ void SOC_U::Poll(Kernel::HLERequestContext& ctx) {
|
|||
ret = TranslateError(GET_ERRNO);
|
||||
}
|
||||
|
||||
size_t test = platform_pollfd.size();
|
||||
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.Push(ret);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue