Update some c-style casts -> reinterpret_cast
This commit is contained in:
parent
6e45de760e
commit
696c0904f8
@ -851,9 +851,10 @@ static void ReadMemory() {
|
|||||||
MemToGdbHex(reply, data.data(), len);
|
MemToGdbHex(reply, data.data(), len);
|
||||||
reply[len * 2] = '\0';
|
reply[len * 2] = '\0';
|
||||||
|
|
||||||
LOG_DEBUG(Debug_GDBStub, "ReadMemory result: {}", (char*)reply);
|
auto reply_str = reinterpret_cast<char*>(reply);
|
||||||
|
|
||||||
SendReply(reinterpret_cast<char*>(reply));
|
LOG_DEBUG(Debug_GDBStub, "ReadMemory result: {}", reply_str);
|
||||||
|
SendReply(reply_str);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Modify location in memory with data received from the gdb client.
|
/// Modify location in memory with data received from the gdb client.
|
||||||
|
@ -140,13 +140,14 @@ void HandleHioReply(const u8* const command_buffer, const u32 command_length) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
u64 unsigned_retval = HexToInt((u8*)command_parts[0].data(), command_parts[0].size());
|
u64 unsigned_retval =
|
||||||
|
HexToInt(reinterpret_cast<const u8*>(command_parts[0].data()), command_parts[0].size());
|
||||||
current_hio_request.retval *= unsigned_retval;
|
current_hio_request.retval *= unsigned_retval;
|
||||||
|
|
||||||
if (command_parts.size() > 1) {
|
if (command_parts.size() > 1) {
|
||||||
// Technically the errno could be signed but in practice this doesn't happen
|
// Technically the errno could be signed but in practice this doesn't happen
|
||||||
current_hio_request.gdb_errno =
|
current_hio_request.gdb_errno =
|
||||||
HexToInt((u8*)command_parts[1].data(), command_parts[1].size());
|
HexToInt(reinterpret_cast<const u8*>(command_parts[1].data()), command_parts[1].size());
|
||||||
} else {
|
} else {
|
||||||
current_hio_request.gdb_errno = 0;
|
current_hio_request.gdb_errno = 0;
|
||||||
}
|
}
|
||||||
@ -228,7 +229,7 @@ bool HandlePendingHioRequestPacket() {
|
|||||||
case 's':
|
case 's':
|
||||||
// strings are written as {pointer}/{length}
|
// strings are written as {pointer}/{length}
|
||||||
fmt::format_to(std::back_inserter(packet), ",{:x}/{:x}",
|
fmt::format_to(std::back_inserter(packet), ",{:x}/{:x}",
|
||||||
(u32)current_hio_request.parameters[i],
|
static_cast<u32>(current_hio_request.parameters[i]),
|
||||||
current_hio_request.string_lengths[nStr++]);
|
current_hio_request.string_lengths[nStr++]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user