• Bug#1066213: slrn: FTBFS: misc.c:376:4: error: implicit declaration of

    From Lucas Nussbaum@21:1/5 to All on Wed Mar 13 13:00:02 2024
    Source: slrn
    Version: 1.0.3+dfsg-6
    Severity: serious
    Justification: FTBFS
    Tags: trixie sid ftbfs
    User: lucas@debian.org
    Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

    Hi,

    During a rebuild of all packages in sid, your package failed to build
    on amd64.

    This is most likely caused by a change in dpkg 1.22.6, that enabled -Werror=implicit-function-declaration. For more information, see https://wiki.debian.org/qa.debian.org/FTBFS#A2024-03-13_-Werror.3Dimplicit-function-declaration

    Relevant part (hopefully):
    cd /<<PKGBUILDDIR>>/src/objs && gcc -c -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -Wall -Wformat=2 -Wunused -
    Wundef -Wextra -Wswitch-enum -Wpointer-arith -Wnested-externs -Wbad-function-cast -Wcast-qual -Wcast-align -Wshadow -Dunix -Wdate-time -D_FORTIFY_SOURCE=2 -I/usr/lib/x86_64-linux-gnu/include -DSLRN_SLANG_DIR=\"/usr/share/slrn/slang\" -DSLRN_LIB_DIR=\
    "/usr/share/slrn\" -DSLRN_CONF_DIR=\"/etc/news\" -DNLS_LOCALEDIR=\"/usr/share/locale\" /<<PKGBUILDDIR>>/src/misc.c
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘top_status_line_cb’: /<<PKGBUILDDIR>>/src/misc.c:243:54: warning: ‘%x’ yields only last 2 digits of year in some locales [-Wformat-y2k]
    243 | if (0 != (*len = strftime (buf, sizeof(buf), "%x", localtime(&now))))
    | ^~~~ /<<PKGBUILDDIR>>/src/misc.c: In function ‘slrn_verror’: /<<PKGBUILDDIR>>/src/misc.c:376:4: error: implicit declaration of function ‘VA_COPY’ [-Werror=implicit-function-declaration]
    376 | VA_COPY(ap1, ap);
    | ^~~~~~~
    /<<PKGBUILDDIR>>/src/misc.c:376:4: warning: nested extern declaration of ‘VA_COPY’ [-Wnested-externs]
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘slrn_mail_file’: /<<PKGBUILDDIR>>/src/misc.c:1097:82: warning: unused parameter ‘subject’ [-Wunused-parameter]
    1097 | int slrn_mail_file (char *file, int edit, unsigned int editline, char *to, char *subject) /*{{{*/
    | ~~~~~~^~~~~~~
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘create_edit_command’: /<<PKGBUILDDIR>>/src/misc.c:1431:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
    1431 | return slrn_strdup_printf (edit, file);
    | ^~~~~~
    /<<PKGBUILDDIR>>/src/misc.c:1436:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
    1436 | cmd1 = slrn_strdup_printf (edit, (int) line);
    | ^~~~
    /<<PKGBUILDDIR>>/src/misc.c:1444:11: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
    1444 | return slrn_strdup_printf (edit, line, file);
    | ^~~~~~
    /<<PKGBUILDDIR>>/src/misc.c:1445:9: warning: format not a string literal, argument types not checked [-Wformat-nonliteral]
    1445 | else return slrn_strdup_printf (edit, file, line);
    | ^~~~
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘generic_mini_complete’: /<<PKGBUILDDIR>>/src/misc.c:1944:26: warning: cast between incompatible function types from ‘void (*)(void *, size_t, size_t, int (*)(const void *, const void *))’ {aka ‘void (*)(void *, long unsigned int, long unsigned int, int (*)(const
    void *, const void *))’} to ‘void (*)(char **, unsigned int, unsigned int, int (*)(char **, char **))’ [-Wcast-function-type]
    1944 | qsort_fun = (void (*)(char **, unsigned int,
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:1962:25: warning: cast between incompatible function types from ‘int (*)(char *)’ to ‘int (*)(void)’ [-Wcast-function-type]
    1962 | if ((n < 2) && ((FVOID_STAR) Complete_Open == (FVOID_STAR) dir_findfirst) &&
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:1962:55: warning: cast between incompatible function types from ‘int (*)(char *)’ to ‘int (*)(void)’ [-Wcast-function-type]
    1962 | if ((n < 2) && ((FVOID_STAR) Complete_Open == (FVOID_STAR) dir_findfirst) &&
    | ^ /<<PKGBUILDDIR>>/src/misc.c: At top level: /<<PKGBUILDDIR>>/src/misc.c:2062:26: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2062 | #define A_KEY(s, f) {s, (int (*)(void)) f}
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2066:4: note: in expansion of macro ‘A_KEY’
    2066 | A_KEY("complete", mini_complete),
    | ^~~~~
    /<<PKGBUILDDIR>>/src/misc.c:2062:26: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2062 | #define A_KEY(s, f) {s, (int (*)(void)) f}
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2067:4: note: in expansion of macro ‘A_KEY’
    2067 | A_KEY("cycle", mini_cycle),
    | ^~~~~
    /<<PKGBUILDDIR>>/src/misc.c:2062:26: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2062 | #define A_KEY(s, f) {s, (int (*)(void)) f}
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2068:4: note: in expansion of macro ‘A_KEY’
    2068 | A_KEY("delbol", rli_del_bol),
    | ^~~~~
    /<<PKGBUILDDIR>>/src/misc.c:2062:26: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2062 | #define A_KEY(s, f) {s, (int (*)(void)) f}
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2069:4: note: in expansion of macro ‘A_KEY’
    2069 | A_KEY("delbow", rli_del_bow),
    | ^~~~~
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘slrn_init_readline’: /<<PKGBUILDDIR>>/src/misc.c:2293:27: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2293 | SLkm_define_key ("\t", (FVOID_STAR) mini_complete, Slrn_RLine_Keymap);
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2294:26: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2294 | SLkm_define_key (" ", (FVOID_STAR) mini_cycle, Slrn_RLine_Keymap);
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2295:27: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2295 | SLkm_define_key ("^U", (FVOID_STAR) rli_del_bol, Slrn_RLine_Keymap);
    | ^
    /<<PKGBUILDDIR>>/src/misc.c:2296:27: warning: cast between incompatible function types from ‘int (*)(SLrline_Type *)’ {aka ‘int (*)(struct _pSLrline_Type *)’} to ‘int (*)(void)’ [-Wcast-function-type]
    2296 | SLkm_define_key ("^W", (FVOID_STAR) rli_del_bow, Slrn_RLine_Keymap);
    | ^
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘slrn_pclose’: /<<PKGBUILDDIR>>/src/misc.c:1340:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    1340 | fgets (buf, sizeof(buf), stdin);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘slrn_popen’: /<<PKGBUILDDIR>>/src/misc.c:1366:9: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    1366 | fgets (buf, sizeof(buf), stdin);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /<<PKGBUILDDIR>>/src/misc.c: In function ‘slrn_get_response’: /<<PKGBUILDDIR>>/src/misc.c:2343:26: warning: ignoring return value of ‘fgets’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    2343 | (void) fgets (buf, sizeof(buf), stdin);
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    cc1: some warnings being treated as errors
    make[2]: *** [Makefile:270: /<<PKGBUILDDIR>>/src/objs/misc.o] Error 1


    The full build log is available from: http://qa-logs.debian.net/2024/03/13/slrn_1.0.3+dfsg-6_unstable.log

    All bugs filed during this archive rebuild are listed at: https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lucas@debian.org
    or: https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20240313&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

    A list of current common problems and possible solutions is available at http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

    If you reassign this bug to another package, please mark it as 'affects'-ing this package. See https://www.debian.org/Bugs/server-control#affects

    If you fail to reproduce this, please provide a build log and diff it with mine so that we can identify if something relevant changed in the meantime.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)