openexr icon indicating copy to clipboard operation
openexr copied to clipboard

%ld used instead of %lld in chunk.c

Open patlefort opened this issue 2 years ago • 1 comments

Minor problem:

src/lib/OpenEXRCore/chunk.c:350:86: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘int64_t’ {aka ‘long long int’} [-Wformat=]
  350 |                 "Invalid chunk size reconstructing chunk table: found out of range %ld",
      |                                                                                    ~~^
      |                                                                                      |
      |                                                                                      long int
      |                                                                                    %lld
  351 |                 leaderdata->deep_data[1]);
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~
      |                                      |
      |                                      int64_t {aka long long int}

patlefort avatar Apr 11 '22 23:04 patlefort

This is platform dependent, so for portability it is best to use the inttypes.h print format macros (PRId64 in this case).

kmilos avatar Apr 22 '22 08:04 kmilos

Should be resolved by #1287

cary-ilm avatar Oct 31 '22 02:10 cary-ilm