[MacPorts] #51970: tiff: patch to configure.ac in changeset 120378 inconsistently defines int64 and uint64 print formats (was: Tiff: patch to configure.ac in changeset 120378 inconsistently defines int64 and uint64 print formats)

MacPorts noreply at macports.org
Thu Apr 14 06:56:36 UTC 2022


#51970: tiff: patch to configure.ac in changeset 120378 inconsistently defines
int64 and uint64 print formats
-------------------------+------------------------
  Reporter:  someuser12  |      Owner:  ryandesign
      Type:  defect      |     Status:  closed
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:  2.3.4
Resolution:  wontfix     |   Keywords:  haspatch
      Port:  tiff        |
-------------------------+------------------------
Changes (by ryandesign):

 * status:  new => closed
 * keywords:   => haspatch
 * resolution:   => wontfix


Old description:

> 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).

New description:

 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).

--

Comment:

 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.

-- 
Ticket URL: <https://trac.macports.org/ticket/51970#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list