-
Notifications
You must be signed in to change notification settings - Fork 244
Labels
RTEMSbugunit-testTickets related to the OSAL unit testing (functional and/or coverage)Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone
Description
Describe the bug
Somewhere a printf in "queue_test.c" got changed without the requisite cast, now generates a warning on RTEMS.
/home/joe/code/cfecfs/github/osal/src/tests/queue-test/queue-test.c: In function 'task_1':
/home/joe/code/cfecfs/github/osal/src/tests/queue-test/queue-test.c:89:13: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32' [-Werror=format=]
UtAssert_True(data_received == expected, "TASK 1: data_received (%u) == expected (%u)",
^
/home/joe/code/cfecfs/github/osal/src/tests/queue-test/queue-test.c:89:13: error: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'uint32' [-Werror=format=]
To Reproduce
Build for RTEMS 4.11 with default config
Expected behavior
Should build successfully
System observed on:
RTEMS 4.11.3 target on Ubuntu 20.04 build host.
Additional context
Need to always remember to always cast args in printf when using fixed-width types. This breaks very frequently.
Reporter Info
Joseph Hickey, Vantage Systems, Inc.
Metadata
Metadata
Assignees
Labels
RTEMSbugunit-testTickets related to the OSAL unit testing (functional and/or coverage)Tickets related to the OSAL unit testing (functional and/or coverage)