Fix #273: Correct format code in debug message#276
Conversation
Cast the address value so it may be printed as an integer.
skliper
left a comment
There was a problem hiding this comment.
Would it make sense to report as 64 bit, since address could be up to this size?
ghost
left a comment
There was a problem hiding this comment.
I think this is OK for now. RTEMS supports 3 64 bit architectures (x86_64, Sparc64, and RISCV) and we don't currently have them on our radar. The first RTEMS 64 bit port will probably need to go through and address any items like this.
As it is |
Isn't the format of 0x%08lX only up to 8 digits? |
The printf field width (8) is a minimum width. Printf formatters will go beyond the specified width to print the value; they don't truncate, they just expand. So on a 64-bit platform it will just print more digits as needed, it'll work fine. |
|
CCB 20191030 - Code reviewed and approved |
Describe the contribution
Fixes issue #273
Just adds a typecast to avoid the warning
Testing performed
Build code on i686-rtems4.11 platform, with -Wall -Werror and OS_DEBUG_PRINTF option enabled.
Expected behavior changes
Observe no more warning about the format mismatch.
System(s) tested on:
Ubuntu 18.04.2 LTS 64 bit (build host) using i686-rtems4.11 cross toolchain
Contributor Info
Joseph Hickey, Vantage Systems, Inc.