aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
authorAntonio Borneo <borneo.antonio@gmail.com>2019-05-06 14:22:06 +0200
committerAntonio Borneo <borneo.antonio@gmail.com>2020-07-08 22:07:56 +0100
commitbf346292942868db6ed8a71e2c4c8b8359d6d300 (patch)
tree32dc24fad6c72c7b3083f71de50a4fe08d1e9c95 /src/target
parentf29d157882a756e562d224dd128eea1bbe3e3813 (diff)
downloadriscv-openocd-bf346292942868db6ed8a71e2c4c8b8359d6d300.zip
riscv-openocd-bf346292942868db6ed8a71e2c4c8b8359d6d300.tar.gz
riscv-openocd-bf346292942868db6ed8a71e2c4c8b8359d6d300.tar.bz2
coding style: fix print of hex values as decimal
It is an error to prefix with "0x" the print of values in decimal. Replace the incorrect decimal format specifier with PRIx32. Issue identified by checkpatch script from Linux kernel v5.1 using the command find src/ -type f -exec ./tools/scripts/checkpatch.pl \ -q --types PRINTF_0XDECIMAL -f {} \; Change-Id: I2eb867ef654527b2737ba573a405ec8f97c6a739 Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-on: http://openocd.zylin.com/5624 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'src/target')
-rw-r--r--src/target/image.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/target/image.c b/src/target/image.c
index 9bd8f6b..1003c3b 100644
--- a/src/target/image.c
+++ b/src/target/image.c
@@ -497,7 +497,7 @@ static int image_elf_read_section(struct image *image,
if (offset < field32(elf, segment->p_filesz)) {
/* maximal size present in file for the current segment */
read_size = MIN(size, field32(elf, segment->p_filesz) - offset);
- LOG_DEBUG("read elf: size = 0x%zu at 0x%" PRIx32 "", read_size,
+ LOG_DEBUG("read elf: size = 0x%zx at 0x%" PRIx32 "", read_size,
field32(elf, segment->p_offset) + offset);
/* read initialized area of the segment */
retval = fileio_seek(elf->fileio, field32(elf, segment->p_offset) + offset);