Using %z in printf is not portable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
EPICS Base |
New
|
Undecided
|
Unassigned |
Bug Description
Some code in EPICS uses printf with the z format modifier for size_t arguments, as in "%zu". This is not portable. VxWorks (at least up to version 6.9.0) does not understand this and prints "zu" and then shifts all the remaining arguments to the wrong format specifier!
Older Windows versions use "%Iu" for the same purpose.
Affected code:
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
modules/
summary: |
- Using %z in printf is not portavle + Using %z in printf is not portable |
description: | updated |
description: | updated |
I suggest to #define an osd macro to be used with the printf format string, like those in inttypes.h (which also does not support size_t).