Bug#1065756: pngnq: FTBFS on arm{el, hf}: rwpng.c:242:13: error: implicit declaration of function ‘strncmp’ [-Werror=implicit-function-declaration]
Sebastian Ramacher
sramacher at debian.org
Sat Mar 9 20:07:09 GMT 2024
Source: pngnq
Version: 1.1+ds-2
Severity: serious
Tags: ftbfs sid trixie
Justification: fails to build from source (but built successfully in the past)
X-Debbugs-Cc: sramacher at debian.org
https://buildd.debian.org/status/fetch.php?pkg=pngnq&arch=armhf&ver=1.1%2Bds-2%2Bb1&stamp=1709981044&raw=0
gcc -DHAVE_CONFIG_H -I. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64 -Wdate-time -D_FORTIFY_SOURCE=2 `libpng-config --I_opts` -Wall --pedantic -std=gnu99 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -c -o colorspace.o colorspace.c
rwpng.c: In function ‘rwpng_read_image’:
rwpng.c:242:13: error: implicit declaration of function ‘strncmp’ [-Werror=implicit-function-declaration]
242 | if(!strncmp("author",comments[c].key,6)){
| ^~~~~~~
rwpng.c:40:1: note: include ‘<string.h>’ or provide a declaration of ‘strncmp’
39 | #include "rwpng.h" /* typedefs, common macros, public prototypes */
+++ |+#include <string.h>
40 |
rwpng.c:242:46: warning: ‘strncmp’ argument 3 type is ‘int’ where ‘unsigned int’ is expected in a call to built-in function declared without prototype [-Wbuiltin-declaration-mismatch]
242 | if(!strncmp("author",comments[c].key,6)){
| ^
<built-in>: note: built-in ‘strncmp’ declared here
In file included from colorspace.c:7:
colorspace.h:25:18: warning: ‘d00’ defined but not used [-Wunused-variable]
25 | static color_XYZ d00 = {0.0, 0.0, 0.0};
| ^~~
rwpng.c:85:5: warning: ignoring return value of ‘fread’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
85 | fread(sig, 1, 8, infile);
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from pngnq.c:99:
neuquant32.h:59:22: warning: ‘biasvalue’ declared ‘static’ but never defined [-Wunused-function]
59 | static inline double biasvalue(unsigned int temp);
| ^~~~~~~~~
pngcomp.c: In function ‘main’:
pngcomp.c:118:10: warning: variable ‘block_err_image’ set but not used [-Wunused-but-set-variable]
118 | float* block_err_image = NULL;
| ^~~~~~~~~~~~~~~
pngcomp.c:108:7: warning: variable ‘verbose’ set but not used [-Wunused-but-set-variable]
108 | int verbose = 0;
| ^~~~~~~
pngcomp.c: In function ‘printstats’:
pngcomp.c:506:30: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘png_uint_32’ {aka ‘unsigned int’} [-Wformat=]
506 | printf("Image Dimensions %ld x %ld \n",image1_info.width,image1_info.height);
| ~~^ ~~~~~~~~~~~~~~~~~
| | |
| long int png_uint_32 {aka unsigned int}
| %d
pngcomp.c:506:36: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 3 has type ‘png_uint_32’ {aka ‘unsigned int’} [-Wformat=]
506 | printf("Image Dimensions %ld x %ld \n",image1_info.width,image1_info.height);
| ~~^ ~~~~~~~~~~~~~~~~~~
| | |
| long int png_uint_32 {aka unsigned int}
| %d
In file included from pngcomp.c:59:
colorspace.h: At top level:
colorspace.h:25:18: warning: ‘d00’ defined but not used [-Wunused-variable]
25 | static color_XYZ d00 = {0.0, 0.0, 0.0};
| ^~~
colorspace.h:24:18: warning: ‘d65’ defined but not used [-Wunused-variable]
24 | static color_XYZ d65 = {0.94810,1.0000,1.07305};
| ^~~
pngnq.c: In function ‘createoutname’:
pngnq.c:279:7: warning: ‘__builtin_strncpy’ output truncated before terminating nul copying 1 byte from a string of the same length [-Wstringop-truncation]
279 | strncpy(newdir+dir_len,DIR_SEPARATOR_STR,1);
| ^
cc1: some warnings being treated as errors
make[3]: *** [Makefile:403: rwpng.o] Error 1
Cheers
--
Sebastian Ramacher
More information about the Pkg-phototools-devel
mailing list