Skip to content

Commit

Permalink
riscv32: Added a missing #if ENABLE_DEBUG guard around the `DEBUG_P…
Browse files Browse the repository at this point in the history
…ROTO()` lines in `riscv32_mem_write()`
  • Loading branch information
dragonmux authored and esden committed Nov 17, 2023
1 parent 529c4a4 commit 55bcf46
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/target/riscv32.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,6 +576,7 @@ void riscv32_mem_read(target_s *const target, void *const dest, const target_add

void riscv32_mem_write(target_s *const target, const target_addr_t dest, const void *const src, const size_t len)
{
#if ENABLE_DEBUG
DEBUG_PROTO("%s: @ %" PRIx32 " len %zu:", __func__, dest, len);
const uint8_t *const data = (const uint8_t *)src;
for (size_t offset = 0; offset < len; ++offset) {
Expand All @@ -586,6 +587,7 @@ void riscv32_mem_write(target_s *const target, const target_addr_t dest, const v
if (len > 16U)
DEBUG_PROTO(" ...");
DEBUG_PROTO("\n");
#endif
/* If we're asked to do a 0-byte read, do nothing */
if (!len)
return;
Expand Down

0 comments on commit 55bcf46

Please sign in to comment.