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

New printf warnings in RTEMS build #988

Closed
jphickey opened this issue Nov 2, 2020 · 0 comments · Fixed by #990 or #991
Closed

New printf warnings in RTEMS build #988

jphickey opened this issue Nov 2, 2020 · 0 comments · Fixed by #990 or #991
Assignees
Labels
Milestone

Comments

@jphickey
Copy link
Contributor

jphickey commented Nov 2, 2020

Describe the bug
A recent change re-introduced some printf type warnings on the 32-bit RTEMS build

To Reproduce
Build for RTEMS i686 target
Warnings are issued:

[ 65%] Building C object cfe-core/CMakeFiles/cfe-core.dir/src/sb/cfe_sb_api.c.o
/home/joe/code/cfecfs/github/cfe/fsw/cfe-core/src/sb/cfe_sb_api.c: In function 'CFE_SB_SubscribeFull':
/home/joe/code/cfecfs/github/cfe/fsw/cfe-core/src/sb/cfe_sb_api.c:899:9: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'uint32' [-Werror=format=]
         (unsigned int)CFE_SB_MsgIdToValue(MsgId), Collisions);
         ^
cc1: all warnings being treated as errors

Expected behavior
Should build cleanly

System observed on:
Ubuntu 20.04 build host for i686-rtems4.11 target.

Additional context
This always happens with fixed width types, needs explicit cast when used with printf.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey added the bug label Nov 2, 2020
@jphickey jphickey self-assigned this Nov 2, 2020
jphickey added a commit to jphickey/cFE that referenced this issue Nov 2, 2020
Cast fixed width types to the type used in the printf call
astrogeco added a commit that referenced this issue Nov 3, 2020
@astrogeco astrogeco added this to the 7.0.0 milestone Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants