Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTEMS build broken due to format mismatch (again) #809

Closed
jphickey opened this issue Feb 12, 2021 · 1 comment · Fixed by #811 or #774
Closed

RTEMS build broken due to format mismatch (again) #809

jphickey opened this issue Feb 12, 2021 · 1 comment · Fixed by #811 or #774
Labels
bug RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Milestone

Comments

@jphickey
Copy link
Contributor

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.

@jphickey jphickey added the bug label Feb 12, 2021
@skliper
Copy link
Contributor

skliper commented Feb 12, 2021

We SHALL get this in CI soon...

@skliper skliper added this to the 6.0.0 milestone Feb 12, 2021
jphickey added a commit to jphickey/osal that referenced this issue Feb 12, 2021
Using %u conversion requires unsigned int arg, not necessarily uint32
@astrogeco astrogeco added RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage) labels Feb 12, 2021
astrogeco added a commit that referenced this issue Feb 12, 2021
Fix #809, cast args to printf in queue-test
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
jphickey pushed a commit to jphickey/osal that referenced this issue Aug 10, 2022
…ional_Test

Fix nasa#809, es child task functional test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug RTEMS unit-test Tickets related to the OSAL unit testing (functional and/or coverage)
Projects
None yet
3 participants