[MacPorts] #51970: Tiff: patch to configure.ac in changeset 120378 inconsistently defines int64 and uint64 print formats
MacPorts
noreply at macports.org
Fri Aug 5 07:30:17 PDT 2016
#51970: Tiff: patch to configure.ac in changeset 120378 inconsistently defines
int64 and uint64 print formats
---------------------------+--------------------------------
Reporter: macosx12345@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.3.4
Keywords: | Port: tiff
---------------------------+--------------------------------
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).
--
Ticket URL: <https://trac.macports.org/ticket/51970>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list