Skip to content

Conversation

tpambor
Copy link
Contributor

@tpambor tpambor commented Oct 4, 2025

Change variables in test_cb_data_type from uint32_t to size_t to match the return type of flash_get_page_count() and adjust format specifiers accordingly. This resolves warnings when compiling for 64-bit platforms.

/home/user/west_workspace/zephyr/tests/drivers/flash/common/src/main.c: In function 'flash_driver_test_flash_page_layout':
/home/user/west_workspace/zephyr/tests/drivers/flash/common/src/main.c:416:22: error: format '%d' expects argument of type 'int', but argument 7 has type 'size_t' {aka 'long unsigned int'} [-Werror=format=]
  416 |                      "page_count = %d not equal to pages counted with cb = %d", page_count,
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~~~~~~~
      |                                                                                 |
      |                                                                                 size_t {aka long unsigned int}

Part of #96968

Change variables in test_cb_data_type from uint32_t to size_t to
match the return type of flash_get_page_count() and adjust
format specifiers accordingly. This resolves warnings when
compiling for 64-bit platforms.

Signed-off-by: Tim Pambor <[email protected]>
@zephyrbot zephyrbot added area: Flash area: Tests Issues related to a particular existing or missing test labels Oct 4, 2025
Copy link

sonarqubecloud bot commented Oct 4, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Flash area: Tests Issues related to a particular existing or missing test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants