Skip to content

Time Base API test introduced new format warnings #505

@jphickey

Description

@jphickey

Describe the bug
New warnings noted when building for RTEMS:

/home/joe/code/cfecfs/github/osal/src/tests/time-base-api-test/time-base-api-test.c:110:5: error: format '%d' expects argument of type 'int', but argument 4 has type 'int32' [-Werror=format=]
     snprintf(overMaxTimeBase, 12, "TimeBase%d", TimeBaseNum);
     ^

To Reproduce
Build code using i686-rtems4.11 toolchain.

Expected behavior
Should build cleanly.

System observed on:
Cross compile for i686-rtems4.11 on Ubuntu 20.04 host.

Additional context
Needs cast whenever fixed-width types are used with printf.

Reporter Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions