Bug#1030152: pngtools: please add patch proposed upstream

Gianfranco Costamagna locutusofborg at debian.org
Tue Jan 31 16:48:14 GMT 2023


Source: pngtools
Version: 0.5~git20220314.1ccca3a-2
tags: patch
forwarded: https://github.com/mikalstill/pngtools/pull/20

Hello, as said,

  gcc -DPACKAGE_NAME="pngtools" -DPACKAGE_TARNAME="pngtools" -DPACKAGE_VERSION="0.4-dev" -DPACKAGE_STRING="pngtools\ 0.4-dev" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="pngtools" -DVERSION="0.4-dev" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_PNG_H=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -Werror -c -o pngread.o pngread.c
pnginfo.c: In function 'pnginfo_displayfile':
pnginfo.c:419:33: error: format '%d' expects argument of type 'int', but argument 2 has type 'long unsigned int' [-Werror=format=]
419 | printf ("* %d ", runlen);
| ~^ ~~~~~~
| | |
| int long unsigned int
| %ld
gcc -DPACKAGE_NAME="pngtools" -DPACKAGE_TARNAME="pngtools" -DPACKAGE_VERSION="0.4-dev" -DPACKAGE_STRING="pngtools\ 0.4-dev" -DPACKAGE_BUGREPORT="" -DPACKAGE_URL="" -DPACKAGE="pngtools" -DVERSION="0.4-dev" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_PNG_H=1 -I. -Wdate-time -D_FORTIFY_SOURCE=2 -Werror -c -o pngwrite.o pngwrite.c


Changing
printf ("* %d ", runlen);
to
printf ("* %ld ", runlen);

Fixes the issue.

G.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-phototools-devel/attachments/20230131/a1e90fa7/attachment.sig>


More information about the Pkg-phototools-devel mailing list