Bug#1066346: sc: FTBFS: sc.c:1301:46: error: implicit declaration of function ‘list_frames’; did you mean ‘list_ranges’? [-Werror=implicit-function-declaration]

2024-04-09 Thread Adam Majer

On 2024-04-07 05:23, Ying-Chun Liu (PaulLiu) wrote:

I've fixed the bug. And I'll do NMU if no one object in 10 days.
I'll upload it to the delay/10 queue.

Attachment is the debdiff. Please review it.


Thanks, looks good

- Adam



Bug#1066346: sc: FTBFS: sc.c:1301:46: error: implicit declaration of function ‘list_frames’; did you mean ‘list_ranges’? [-Werror=implicit-function-declaration]

2024-04-06 Thread Ying-Chun Liu (PaulLiu)

Hi,

I've fixed the bug. And I'll do NMU if no one object in 10 days.
I'll upload it to the delay/10 queue.

Attachment is the debdiff. Please review it.

Yours,
Paul
diff -Nru sc-7.16/debian/changelog sc-7.16/debian/changelog
--- sc-7.16/debian/changelog2022-01-26 01:22:23.0 +0800
+++ sc-7.16/debian/changelog2024-04-07 09:47:51.0 +0800
@@ -1,3 +1,11 @@
+sc (7.16-4.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix FTBFS by -Werror=implicit-function-declaration (Closes: #1066346)
+- Add debian/patches/fix-ftbfs-implicit-function-declaration.patch
+
+ -- Ying-Chun Liu (PaulLiu)   Sun, 07 Apr 2024 09:47:51 
+0800
+
 sc (7.16-4.1) unstable; urgency=low
 
   [ Ying-Chun Liu (PaulLiu)  ]
diff -Nru sc-7.16/debian/patches/fix-ftbfs-implicit-function-declaration.patch 
sc-7.16/debian/patches/fix-ftbfs-implicit-function-declaration.patch
--- sc-7.16/debian/patches/fix-ftbfs-implicit-function-declaration.patch
1970-01-01 08:00:00.0 +0800
+++ sc-7.16/debian/patches/fix-ftbfs-implicit-function-declaration.patch
2024-04-07 09:47:51.0 +0800
@@ -0,0 +1,27 @@
+Description: fix ftbfs caused by -Werror=implicit-function-declaration
+ For dpkg >= 1.22.6, -Werror=implicit-function-declaration is turned
+ on by default. So we need to declare every functions.
+Bug-Debian: http://bugs.debian.org/1066346
+Author: Ying-Chun Liu (PaulLiu) 
+Last-Update: 2024-04-07
+Index: sc-7.16/sc.h
+===
+--- sc-7.16.orig/sc.h
 sc-7.16/sc.h
+@@ -641,3 +641,16 @@ void leftlimit();
+ void rightlimit();
+ void gototop();
+ void gotobottom();
++void list_frames(FILE *);
++void yankrow(int);
++void yankcol(int);
++void ljustify(int, int, int, int);
++void rjustify(int, int, int, int);
++void center(int, int, int, int);
++void gotonote();
++void add_abbr(char *);
++void getframe(int);
++void getrange(char *, int);
++void doeval(struct enode *, char *, int, int, int);
++void doseval(struct enode *, int, int, int);
++void dogetkey();
diff -Nru sc-7.16/debian/patches/series sc-7.16/debian/patches/series
--- sc-7.16/debian/patches/series   2022-01-26 00:34:21.0 +0800
+++ sc-7.16/debian/patches/series   2024-04-07 09:47:51.0 +0800
@@ -4,3 +4,4 @@
 function_definitions
 nonotimeout.patch
 hardening
+fix-ftbfs-implicit-function-declaration.patch


OpenPGP_0x44173FA13D05.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


Bug#1066346: sc: FTBFS: sc.c:1301:46: error: implicit declaration of function ‘list_frames’; did you mean ‘list_ranges’? [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: sc
Version: 7.16-4.1
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):
> gcc -Wall -DSYSV3 -ffloat-store -g -O2 -Werror=implicit-function-declaration 
> -ffile-prefix-map=/<>=. -fstack-protector-strong 
> -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> -DDFLT_PAGER=\"less\" -DSIGVOID -DSAVENAME=\"SC.SAVE\" -c sc.c
> pipe.c: In function ‘getnum’:
> pipe.c:39:16: warning: suggest explicit braces to avoid ambiguous ‘else’ 
> [-Wdangling-else]
>39 | if (p)
>   |^
> In file included from pipe.c:12:
> pipe.c: In function ‘doquery’:
> pipe.c:311:11: warning: zero-length gnu_printf format string 
> [-Wformat-zero-length]
>   311 | error("");
>   |   ^~
> sc.h:46:101: note: in definition of macro ‘error’
>46 | # define error(format, msg...) (void)(isatty(fileno(stdout)) && 
> !move(1,0) && !clrtoeol() && printw(format, ## msg))
>   |   
>   ^~
> pipe.c: In function ‘getnum’:
> pipe.c:49:13: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>49 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘fgetnum’:
> pipe.c:92:13: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>92 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘getstring’:
> pipe.c:117:13: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   117 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘getexp’:
> pipe.c:149:13: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   149 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘getformat’:
> pipe.c:163:5: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   163 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘getfmt’:
> pipe.c:182:13: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   182 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘getframe’:
> pipe.c:206:5: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   206 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘getrange’:
> pipe.c:249:5: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   249 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘doeval’:
> pipe.c:271:5: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   271 | write(fd, line, strlen(line));
>   | ^
> pipe.c: In function ‘doseval’:
> pipe.c:288:9: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   288 | write(fd, s, strlen(s));
>   | ^~~
> pipe.c:289:5: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   289 | write(fd, "\n", 1);
>   | ^~
> pipe.c: In function ‘doquery’:
> pipe.c:305:9: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   305 | write(fd, line, strlen(line));
>   | ^
> pipe.c:306:9: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   306 | write(fd, "\n", 1);
>   | ^~
> pipe.c: In function ‘dogetkey’:
> pipe.c:347:5: warning: ignoring return value of ‘write’ declared with 
> attribute ‘warn_unused_result’ [-Wunused-result]
>   347 | write(macrofd, line, len);
>   | ^
> pipe.c: In function ‘dostat’:
> pipe.c:358:5: warning: ignoring return value of ‘write’