ROHC library build emits warnings on x86-64
Bug #800835 reported by
Didier Barvaux
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
rohc | Status tracked in Rohc-main | |||||
1.2.x |
Invalid
|
Undecided
|
Didier Barvaux | |||
1.3.x |
Invalid
|
Undecided
|
Didier Barvaux | |||
Rohc-main |
Fix Released
|
Low
|
Didier Barvaux |
Bug Description
On a x86-64 system, building the ROHC library (trunk version) emits several warnings about wrong conversion specifications for variables of type size_t. Indeed %zd should be used instead of %d or %u for size_t variables.
Steps to reproduce:
1. Retrieve trunk sources
2. ./autogen.sh --enable-
3. make clean all check
With the --enable-
tags: | added: portability |
To post a comment you must log in.
%zu may be used if C99 is used to compile ROHC. (length modifier 'z' was added in C99, cf http:// en.wikipedia. org/wiki/ C99 or http:// www.open- std.org/ jtc1/sc22/ WG14/www/ docs/n1256. pdf page 352).
If compatibility with C90 is required, using '%lu', and casting any 'size_t' variables to 'unsigned long' is sufficient.
Provided patch uses '%lu' formater, compiles and passes tests successfully on both 32 and 64 bits plateforms (with GCC 4.6)