mirror of
https://github.com/PabloMK7/citra.git
synced 2025-10-11 20:10:03 +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
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue