fix warnings in windows build
This commit is contained in:
parent
9cf8131b23
commit
12a7e17a41
|
@ -80,7 +80,7 @@ void CEXIETHERNET::TAPServerNetworkInterface::HandleReceivedFrame(std::string&&
|
|||
else
|
||||
{
|
||||
memcpy(m_eth_ref->mRecvBuffer.get(), data.data(), data.size());
|
||||
m_eth_ref->mRecvBufferLength = data.size();
|
||||
m_eth_ref->mRecvBufferLength = static_cast<u32>(data.size());
|
||||
m_eth_ref->RecvHandlePacket();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -320,9 +320,9 @@ void TAPServerConnection::ReadThreadHandler()
|
|||
case ReadState::DATA:
|
||||
case ReadState::SKIP:
|
||||
{
|
||||
ws_ssize_t bytes_to_read = frame_data.size() - frame_bytes_received;
|
||||
ws_ssize_t bytes_read =
|
||||
recv(m_fd, frame_data.data() + frame_bytes_received, bytes_to_read, 0);
|
||||
const std::size_t bytes_to_read = frame_data.size() - frame_bytes_received;
|
||||
ws_ssize_t bytes_read = recv(m_fd, frame_data.data() + frame_bytes_received,
|
||||
static_cast<ws_ssize_t>(bytes_to_read), 0);
|
||||
if (bytes_read <= 0)
|
||||
{
|
||||
ERROR_LOG_FMT(SP1, "Failed to read data from destination: {}", Common::StrNetworkError());
|
||||
|
|
|
@ -313,7 +313,8 @@ void CEXIModem::SetInterruptFlag(u8 what, bool enabled, bool from_cpu)
|
|||
void CEXIModem::OnReceiveBufferSizeChangedLocked(bool from_cpu)
|
||||
{
|
||||
// The caller is expected to hold m_receive_buffer_lock when calling this.
|
||||
const u16 bytes_available = std::min<u16>(m_receive_buffer.size(), 0x200);
|
||||
const u16 bytes_available =
|
||||
static_cast<u16>(std::min<std::size_t>(m_receive_buffer.size(), 0x200));
|
||||
m_regs[Register::BYTES_AVAILABLE_HIGH] = (bytes_available >> 8) & 0xFF;
|
||||
m_regs[Register::BYTES_AVAILABLE_LOW] = bytes_available & 0xFF;
|
||||
SetInterruptFlag(Interrupt::RECEIVE_BUFFER_ABOVE_THRESHOLD,
|
||||
|
|
Loading…
Reference in New Issue