Skip to content

Commit e213815

Browse files
tpamborjhedberg
authored andcommitted
tests: ram_context_for_isr: fix format specifier for addresses
Use %lx for printing addresses (uintptr_t) instead of %x. Signed-off-by: Tim Pambor <[email protected]>
1 parent 5b01615 commit e213815

File tree

1 file changed

+4
-4
lines changed
  • tests/application_development/ram_context_for_isr/src

1 file changed

+4
-4
lines changed

tests/application_development/ram_context_for_isr/src/main.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,16 @@ static void test_irq_callback(const struct device *dev, void *user_data)
3939
/* Check that the function and its call stack are in RAM */
4040
zassert_true(func_addr >= CONFIG_SRAM_BASE_ADDRESS &&
4141
func_addr <= CONFIG_SRAM_BASE_ADDRESS + CONFIG_SRAM_SIZE * 1024,
42-
"%s is not in RAM! Address: 0x%x", __func__, func_addr);
42+
"%s is not in RAM! Address: 0x%lx", __func__, func_addr);
4343

4444
zassert_true(driver_isr_addr >= CONFIG_SRAM_BASE_ADDRESS &&
4545
driver_isr_addr <= CONFIG_SRAM_BASE_ADDRESS + CONFIG_SRAM_SIZE * 1024,
46-
"fake_driver_isr is not in RAM! Address: 0x%x", driver_isr_addr);
46+
"fake_driver_isr is not in RAM! Address: 0x%lx", driver_isr_addr);
4747

4848
zassert_true(arch_isr_wrapper_addr >= CONFIG_SRAM_BASE_ADDRESS &&
4949
arch_isr_wrapper_addr <=
5050
CONFIG_SRAM_BASE_ADDRESS + CONFIG_SRAM_SIZE * 1024,
51-
"arch_isr_wrapper_addr is not in RAM! Address: 0x%x", arch_isr_wrapper_addr);
51+
"arch_isr_wrapper_addr is not in RAM! Address: 0x%lx", arch_isr_wrapper_addr);
5252

5353
TC_PRINT("Callback function address: 0x%lx\n", func_addr);
5454
TC_PRINT("Driver ISR address: 0x%lx\n", driver_isr_addr);
@@ -63,7 +63,7 @@ ZTEST(ram_context_for_isr, test_fake_driver_in_ram)
6363

6464
zassert_true(dev_addr >= CONFIG_SRAM_BASE_ADDRESS &&
6565
dev_addr <= CONFIG_SRAM_BASE_ADDRESS + CONFIG_SRAM_SIZE * 1024,
66-
"fake driver device is not in RAM! Address: 0x%x", dev_addr);
66+
"fake driver device is not in RAM! Address: 0x%lx", dev_addr);
6767

6868
TC_PRINT("Fake driver device address: 0x%lx\n", dev_addr);
6969

0 commit comments

Comments
 (0)