uclouvain / openjpeg

Official repository of the OpenJPEG project
Other
971 stars 456 forks source link

clang -Wformat (32bits) #299

Open gcode-importer opened 10 years ago

gcode-importer commented 10 years ago

Originally reported on Google Code with ID 299

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:208: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:226: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:

Reported by malaterre on 2014-03-17 10:08:26

gcode-importer commented 10 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-nearest-equivalent-of-c99s-z-in-c

Reported by malaterre on 2014-03-17 10:08:55

gcode-importer commented 10 years ago

Reported by malaterre on 2014-03-18 14:47:48