Opened 8 years ago

Closed 2 years ago

#51970 closed defect (wontfix)

tiff: patch to configure.ac in changeset 120378 inconsistently defines int64 and uint64 print formats

Reported by: someuser12 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc:
Port: tiff

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Patch to configure.ac of libtiff in changeset:120378 swaps the tests for (unsigned) long long int and (unsigned) long int before the definitions of (U)INT64_T and (U)INT64_FORMAT and accordingly swaps the definitions of (U)INT64_T but, IMHO, forgot to swap the definitions of (U)INT64_FORMAT, which leads to an inconsistency and warnings by some compilers when compiling libtiff or software which includes tiff.f from libtiff. E.g.

/usr/bin/clang -DHAVE_CONFIG_H -I.   -I/opt/local/include -I/opt/local/include -I/opt/local/include -I/opt/local/include -DHAVE_APPLE_OPENGL_FRAMEWORK  -pipe -Os -arch x86_64 -Wall -W -MT tif_dirread.o -MD -MP -MF .deps/tif_dirread.Tpo -c -o tif_dirread.o tif_dirread.c
tif_dirread.c:3419:64: warning: format specifies type 'unsigned long' but the
      argument has type 'toff_t' (aka 'unsigned long long') [-Wformat]
  ..."Failed to read directory at offset " TIFF_UINT64_FORMAT,nextdiroff);
                                                              ^~~~~~~~~~
tif_dirread.c:4164:71: warning: format specifies type 'unsigned long' but the
      argument has type 'toff_t' (aka 'unsigned long long') [-Wformat]
  ..."Failed to read custom directory at offset " TIFF_UINT64_FORMAT,diroff);
                                                                     ^~~~~~
tif_dirread.c:4420:7: warning: format specifies type 'unsigned long' but the
      argument has type 'uint64' (aka 'unsigned long long') [-Wformat]
                    dir->tdir_count, count);
                    ^~~~~~~~~~~~~~~
tif_dirread.c:4427:7: warning: format specifies type 'unsigned long' but the
      argument has type 'uint64' (aka 'unsigned long long') [-Wformat]
                    dir->tdir_count, count);
                    ^~~~~~~~~~~~~~~
4 warnings generated.

when compiling libtiff with Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn) on Mac OS 10.8.5 .

Here is attached a patch proposal which solves this issue (removes the warning).

Attachments (1)

patch-configure.ac.diff (1.5 KB) - added by someuser12 8 years ago.
Suggested replacement for patch-configure.ac.diff

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by someuser12

Attachment: patch-configure.ac.diff added

Suggested replacement for patch-configure.ac.diff

comment:1 Changed 8 years ago by mf2k (Frank Schima)

Cc: ryandesign@… removed
Owner: changed from macports-tickets@… to ryandesign@…

comment:2 Changed 2 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)
Keywords: haspatch added
Resolution: wontfix
Status: newclosed
Summary: Tiff: patch to configure.ac in changeset 120378 inconsistently defines int64 and uint64 print formatstiff: patch to configure.ac in changeset 120378 inconsistently defines int64 and uint64 print formats

I think this suggestion is no longer applicable as the relevant sections of the patch were removed in [b9c56aa293a018405d66d58eb43c00a09a052d96/macports-ports]. If you still disagree with the way tiff now configures, please take it up with the developer of tiff.

Note: See TracTickets for help on using tickets.