Bug#1066213: slrn: FTBFS: misc.c:376:4: error: implicit declaration of function ‘VA_COPY’ [-Werror=implicit-function-declaration]

2024-05-04 Thread Andreas Beckmann
Followup-For: Bug #1066213
Control: tag -1 patch pending

Hi,

this was fixed and tagged in git a week ago, but so far no upload
happened.


Andreas



Bug#1066213:

2024-04-12 Thread Miriam Espana Acebal
Hi,

In ubuntu we applied the upstream's fix at
https://github.com/jedsoft/slrn/pull/1 (with some refreshing action)  that
I'll attach here for fixing this FTBFS.

I am sending this for your consideration, and I hope that it helps.

Best,

Miriam

-- 
[image: Canonical-20th-anniversary]

Miriam España Acebal

Software Engineer II - Ubuntu Public Cloud/Server

Email:

miriam.esp...@canonical.com

Location:

Spain

canonical.com

ubuntu.com
Origin: upstream, https://github.com/jedsoft/slrn/pull/1/commits/f550d0ab9e1cd3cfe844022435c3d98af3c18441
From: Florian Weimer 
Date: Sat, 4 Feb 2023 15:04:36 +0100
Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/slrn/+bug/2061030
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066213
Subject: [PATCH] autoconf: Fix C99 compatibility issue in the VA_COPY checks

The exit function is called without including , resulting
in an implicit function declarations.  Future compilers will not
support implicit function declarations by default.  This will lead
to build failures.
---
 autoconf/configure.ac | 3 +++
 configure | 3 +++
 2 files changed, 6 insertions(+)

--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -399,6 +399,7 @@
 AC_CACHE_VAL(slrn_cv_va_copy,[
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -419,6 +420,7 @@
 AC_CACHE_VAL(slrn_cv___va_copy,[
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -439,6 +441,7 @@
 AC_CACHE_VAL(slrn_cv_va_val_copy,[
 	AC_RUN_IFELSE([AC_LANG_SOURCE([[
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
--- a/configure
+++ b/configure
@@ -8307,6 +8308,7 @@ else
 /* end confdefs.h.  */
 
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -8353,6 +8354,7 @@ else
 /* end confdefs.h.  */
 
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);
@@ -8399,6 +8400,7 @@
 /* end confdefs.h.  */
 
 	#include 
+	#include 
 	void f (int i, ...) {
 	va_list args1, args2;
 	va_start (args1, i);


Bug#1066213: slrn: FTBFS: misc.c:376:4: error: implicit declaration of function ‘VA_COPY’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: slrn
Version: 1.0.3+dfsg-6
Severity: serious
Justification: FTBFS
Tags: trixie sid ftbfs
User: lu...@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 /<>/src/objs && gcc -c -g -O2 
> -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> -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\"  
> /<>/src/misc.c
> /<>/src/misc.c: In function ‘top_status_line_cb’:
> /<>/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(
>   |  ^~~~
> /<>/src/misc.c: In function ‘slrn_verror’:
> /<>/src/misc.c:376:4: error: implicit declaration of function 
> ‘VA_COPY’ [-Werror=implicit-function-declaration]
>   376 |VA_COPY(ap1, ap);
>   |^~~
> /<>/src/misc.c:376:4: warning: nested extern declaration of 
> ‘VA_COPY’ [-Wnested-externs]
> /<>/src/misc.c: In function ‘slrn_mail_file’:
> /<>/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) /*{{{*/
>   |   
>  ~~^~~
> /<>/src/misc.c: In function ‘create_edit_command’:
> /<>/src/misc.c:1431:9: warning: format not a string literal, 
> argument types not checked [-Wformat-nonliteral]
>  1431 | return slrn_strdup_printf (edit, file);
>   | ^~
> /<>/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);
>   | ^~~~
> /<>/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);
>   |   ^~
> /<>/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);
>   | ^~~~
> /<>/src/misc.c: In function ‘generic_mini_complete’:
> /<>/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,
>   |  ^
> /<>/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) &&
>   | ^
> /<>/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) &&
>   |   ^
> /<>/src/misc.c: At top level:
> /<>/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}
>   |  ^
> /<>/src/misc.c:2066:4: note: in expansion of macro ‘A_KEY’
>  2066 |A_KEY("complete", mini_complete),
>   |^
> /<>/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}
>   |  ^
> /<>/src/misc.c:2067:4: note: in expansion of macro ‘A_KEY’
>  2067 |A_KEY("cycle", mini_cycle),
>   |^
> /<>/src/misc.c:2062:26: warning: cast between