summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/nwm
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/service/nwm')
-rw-r--r--src/core/hle/service/nwm/nwm_uds.cpp10
-rw-r--r--src/core/hle/service/nwm/uds_beacon.cpp4
-rw-r--r--src/core/hle/service/nwm/uds_data.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/hle/service/nwm/nwm_uds.cpp b/src/core/hle/service/nwm/nwm_uds.cpp
index 4e2af9ae6..8ef0cda09 100644
--- a/src/core/hle/service/nwm/nwm_uds.cpp
+++ b/src/core/hle/service/nwm/nwm_uds.cpp
@@ -316,7 +316,7 @@ static void RecvBeaconBroadcastData(Interface* self) {
auto beacons = GetReceivedBeacons(mac_address);
BeaconDataReplyHeader data_reply_header{};
- data_reply_header.total_entries = beacons.size();
+ data_reply_header.total_entries = static_cast<u32>(beacons.size());
data_reply_header.max_output_size = out_buffer_size;
Memory::WriteBlock(current_buffer_pos, &data_reply_header, sizeof(BeaconDataReplyHeader));
@@ -326,8 +326,8 @@ static void RecvBeaconBroadcastData(Interface* self) {
for (const auto& beacon : beacons) {
BeaconEntryHeader entry{};
// TODO(Subv): Figure out what this size is used for.
- entry.unk_size = sizeof(BeaconEntryHeader) + beacon.data.size();
- entry.total_size = sizeof(BeaconEntryHeader) + beacon.data.size();
+ entry.unk_size = static_cast<u32>(sizeof(BeaconEntryHeader) + beacon.data.size());
+ entry.total_size = static_cast<u32>(sizeof(BeaconEntryHeader) + beacon.data.size());
entry.wifi_channel = beacon.channel;
entry.header_size = sizeof(BeaconEntryHeader);
entry.mac_address = beacon.transmitter_address;
@@ -338,9 +338,9 @@ static void RecvBeaconBroadcastData(Interface* self) {
current_buffer_pos += sizeof(BeaconEntryHeader);
Memory::WriteBlock(current_buffer_pos, beacon.data.data(), beacon.data.size());
- current_buffer_pos += beacon.data.size();
+ current_buffer_pos += static_cast<VAddr>(beacon.data.size());
- total_size += sizeof(BeaconEntryHeader) + beacon.data.size();
+ total_size += static_cast<u32>(sizeof(BeaconEntryHeader) + beacon.data.size());
}
// Update the total size in the structure and write it to the buffer again.
diff --git a/src/core/hle/service/nwm/uds_beacon.cpp b/src/core/hle/service/nwm/uds_beacon.cpp
index 552eaf65e..73a80d940 100644
--- a/src/core/hle/service/nwm/uds_beacon.cpp
+++ b/src/core/hle/service/nwm/uds_beacon.cpp
@@ -243,7 +243,7 @@ std::vector<u8> GenerateNintendoFirstEncryptedDataTag(const NetworkInfo& network
EncryptedDataTag tag{};
tag.header.tag_id = static_cast<u8>(TagId::VendorSpecific);
- tag.header.length = sizeof(tag) - sizeof(TagHeader) + payload_size;
+ tag.header.length = static_cast<u8>(sizeof(tag) - sizeof(TagHeader) + payload_size);
tag.oui_type = static_cast<u8>(NintendoTagId::EncryptedData0);
tag.oui = NintendoOUI;
@@ -279,7 +279,7 @@ std::vector<u8> GenerateNintendoSecondEncryptedDataTag(const NetworkInfo& networ
EncryptedDataTag tag{};
tag.header.tag_id = static_cast<u8>(TagId::VendorSpecific);
- tag.header.length = tag_length;
+ tag.header.length = static_cast<u8>(tag_length);
tag.oui_type = static_cast<u8>(NintendoTagId::EncryptedData1);
tag.oui = NintendoOUI;
diff --git a/src/core/hle/service/nwm/uds_data.cpp b/src/core/hle/service/nwm/uds_data.cpp
index 0fd9b8b8c..3ef2a84b6 100644
--- a/src/core/hle/service/nwm/uds_data.cpp
+++ b/src/core/hle/service/nwm/uds_data.cpp
@@ -197,7 +197,7 @@ static std::vector<u8> DecryptDataFrame(const std::vector<u8>& encrypted_payload
df.ChannelMessageEnd(CryptoPP::DEFAULT_CHANNEL);
df.SetRetrievalChannel(CryptoPP::DEFAULT_CHANNEL);
- int size = df.MaxRetrievable();
+ size_t size = df.MaxRetrievable();
std::vector<u8> pdata(size);
df.Get(pdata.data(), size);
@@ -251,7 +251,7 @@ static std::vector<u8> EncryptDataFrame(const std::vector<u8>& payload,
df.SetRetrievalChannel(CryptoPP::DEFAULT_CHANNEL);
- int size = df.MaxRetrievable();
+ size_t size = df.MaxRetrievable();
std::vector<u8> cipher(size);
df.Get(cipher.data(), size);
@@ -266,8 +266,8 @@ static std::vector<u8> EncryptDataFrame(const std::vector<u8>& payload,
std::vector<u8> GenerateDataPayload(const std::vector<u8>& data, u8 channel, u16 dest_node,
u16 src_node, u16 sequence_number) {
std::vector<u8> buffer = GenerateLLCHeader(EtherType::SecureData);
- std::vector<u8> securedata_header =
- GenerateSecureDataHeader(data.size(), channel, dest_node, src_node, sequence_number);
+ std::vector<u8> securedata_header = GenerateSecureDataHeader(
+ static_cast<u16>(data.size()), channel, dest_node, src_node, sequence_number);
buffer.insert(buffer.end(), securedata_header.begin(), securedata_header.end());
buffer.insert(buffer.end(), data.begin(), data.end());