xinxinlx / openjpeg

Automatically exported from code.google.com/p/openjpeg
Other
0 stars 0 forks source link

clang -Wformat (32bits) #299

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
On 32bits arch there are still some warnings left:

http://my.cdash.org/viewBuildError.php?type=1&buildid=581881

/home/voxxl/Dashboards/MyTests/openjpeg-nightly/src/lib/openjpip/box_manager.c:2
08:79: warning: conversion specifies type 'long long' but the argument has type 
'OPJ_SIZE_T' (aka 'unsigned long') [-Wformat]
          fprintf( FCGI_stderr, "Error: error in gene_boxbyType( %d, %" PRId64 ", %" PRId64 ", %s)\n", fd, offset, length, TBox);
                                                                                  ~~~^                             ~~~~~~
/usr/include/inttypes.h:63:34: note: expanded from:
# define PRId64         __PRI64_PREFIX "d"
                                        ^
/home/voxxl/Dashboards/MyTests/openjpeg-nightly/src/lib/openjpip/box_manager.c:2
26:82: warning: conversion specifies type 'long long' but the argument has type 
'OPJ_SIZE_T' (aka 'unsigned long') [-Wformat]
      fprintf( FCGI_stderr, "Error: error in gene_boxbyType( %d, %" PRId64 ", %" PRId64 ", %s)\n", fd, offset, length, TBox);
                                                                              ~~~^                             ~~~~~~
/usr/include/inttypes.h:63:34: note: expanded from:

Original issue reported on code.google.com by mathieu.malaterre on 17 Mar 2014 at 10:08

GoogleCodeExporter commented 9 years ago
We would need a portable solution to printing size_t on Visual Studio 
Compilers, eg:

http://stackoverflow.com/questions/1546789/clean-code-to-printf-size-t-in-c-or-n
earest-equivalent-of-c99s-z-in-c

Original comment by mathieu.malaterre on 17 Mar 2014 at 10:08

GoogleCodeExporter commented 9 years ago

Original comment by mathieu.malaterre on 18 Mar 2014 at 2:47