Bug#1066549: geki2: FTBFS: misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]

2024-05-03 Thread Guillem Jover
Hi!

On Fri, 2024-05-03 at 13:06:21 +0200, Guillem Jover wrote:
> Actually, the attached debdiff should be better (properly split
> patches).

Hrmmf, sorry, please use the attached patch, which fixes some typos in
the patch description. :)

Thanks,
Guillem
diff -Nru geki2-2.0.3/debian/patches/020_headers.diff 
geki2-2.0.3/debian/patches/020_headers.diff
--- geki2-2.0.3/debian/patches/020_headers.diff 2018-05-13 16:22:49.0 
+0200
+++ geki2-2.0.3/debian/patches/020_headers.diff 2024-05-03 13:00:11.0 
+0200
@@ -4,29 +4,25 @@
 
 ===
 ---
- src/geki2.h   | 1 +
- src/ranking.c | 1 +
- 2 files changed, 2 insertions(+)
+ src/geki2.h   |3 +++
+ src/load.c|2 +-
+ src/load.h|1 +
+ src/ranking.c |1 +
+ src/ranking.h |2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
 
-diff --git a/src/geki2.h b/src/geki2.h
-index 938d760..b293afb 100644
 --- a/src/geki2.h
 +++ b/src/geki2.h
-@@ -9,6 +9,7 @@
+@@ -7,9 +7,12 @@
+ #ifndef _GEKI2_H_
+ #define _GEKI2_H_
  
++#include 
  #include 
  #include 
 +#include 
  #include 
++#include 
  #include 
  #include 
-diff --git a/src/ranking.c b/src/ranking.c
-index a6683c5..4e3df6c 100644
 a/src/ranking.c
-+++ b/src/ranking.c
-@@ -1,4 +1,5 @@
- #include 
-+#include 
- #include "geki2.h"
- #include "extern.h"
  
diff -Nru geki2-2.0.3/debian/patches/020_implicit-decl.patch 
geki2-2.0.3/debian/patches/020_implicit-decl.patch
--- geki2-2.0.3/debian/patches/020_implicit-decl.patch  1970-01-01 
01:00:00.0 +0100
+++ geki2-2.0.3/debian/patches/020_implicit-decl.patch  2024-05-03 
12:59:08.0 +0200
@@ -0,0 +1,47 @@
+Description: Add and fix function declarations
+ With the compiler setting -Werror=implicit-function-declaration by default,
+ we need to properly declare all functions in the relevant headers.
+Author: Guillem Jover 
+Origin: vendor
+Forwarded: no
+
+===
+---
+ src/geki2.h   |3 +++
+ src/load.c|2 +-
+ src/load.h|1 +
+ src/ranking.c |1 +
+ src/ranking.h |2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/src/load.c
 b/src/load.c
+@@ -237,7 +237,7 @@ void LoadStageData(void)
+ /**
+   ���ơǡ��
+  **/
+-void UnLoadStageData()
++void UnLoadStageData(void)
+ {
+   Uint8 bossmax[] = {2, 3 * 2, 1 * 2, 1 * 2, 1 * 2, 1 * 2};
+   Uint8 backmax[] = {7, 16, 20, 8, 18, 15};
+--- a/src/load.h
 b/src/load.h
+@@ -9,5 +9,6 @@ void UnLoadPixmaps(PixData **my, int max
+ void CreatePixmap(void);
+ void DeletePixmap(void);
+ void LoadStageData(void);
++void UnLoadStageData(void);
+ 
+ #endif
+--- a/src/ranking.h
 b/src/ranking.h
+@@ -1,7 +1,7 @@
+ #ifndef _RANKING_H_
+ #define _RANKING_H_
+ 
+-void RankingScore(void);
++int ScoreRanking(void);
+ void ReadScore(void);
+ void WriteScore(void);
+ 
diff -Nru geki2-2.0.3/debian/patches/020_scanf.diff 
geki2-2.0.3/debian/patches/020_scanf.diff
--- geki2-2.0.3/debian/patches/020_scanf.diff   2018-05-13 16:22:49.0 
+0200
+++ geki2-2.0.3/debian/patches/020_scanf.diff   2024-05-03 13:03:10.0 
+0200
@@ -4,12 +4,10 @@
 
 ===
 ---
- src/load.c| 2 +-
- src/ranking.c | 4 ++--
+ src/load.c|2 +-
+ src/ranking.c |4 ++--
  2 files changed, 3 insertions(+), 3 deletions(-)
 
-diff --git a/src/load.c b/src/load.c
-index e771eca..284ed8f 100644
 --- a/src/load.c
 +++ b/src/load.c
 @@ -216,7 +216,7 @@ void LoadStageData(void)
@@ -21,11 +19,9 @@
 &(StageDatas[Root->StageMax]->Time),
 &(StageDatas[Root->StageMax]->CreateNo),
 &(StageDatas[Root->StageMax]->Max),
-diff --git a/src/ranking.c b/src/ranking.c
-index 4e3df6c..2ed04af 100644
 --- a/src/ranking.c
 +++ b/src/ranking.c
-@@ -39,9 +39,9 @@ void ReadScore(void)
+@@ -38,9 +38,9 @@ void ReadScore(void)
Uint16 i;
  
if ((fp = fopen(DATA_PATH "/.score", "r"))) {
diff -Nru geki2-2.0.3/debian/patches/020_score_path.diff 
geki2-2.0.3/debian/patches/020_score_path.diff
--- geki2-2.0.3/debian/patches/020_score_path.diff  2018-05-13 
16:22:49.0 +0200
+++ geki2-2.0.3/debian/patches/020_score_path.diff  2024-05-03 
13:03:13.0 +0200
@@ -4,14 +4,12 @@
 
 ===
 ---
- src/ranking.c | 4 ++--
+ src/ranking.c |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/src/ranking.c b/src/ranking.c
-index 2ed04af..fe3f4fc 100644
 --- a/src/ranking.c
 +++ b/src/ranking.c
-@@ -38,7 +38,7 @@ void ReadScore(void)
+@@ -37,7 +37,7 @@ void ReadScore(void)
FILE *fp;
Uint16 i;
  
@@ -20,7 +18,7 @@
  fscanf(fp, "%"SCNu32, &(Root->HiScore));
  for (i = 0; i < 5; i ++)
fscanf(fp, "%"SCNu32" %"SCNu8" %"SCNu8" %s",
-@@ -70,7 +70,7 @@ void WriteScore(void)
+@@ -69,7 +69,7 @@ void WriteScore(void)

Bug#1066549: geki2: FTBFS: misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]

2024-05-03 Thread Guillem Jover
Hi!

On Fri, 2024-05-03 at 12:42:19 +0200, Guillem Jover wrote:
> Control: tag -1 patch

> On Wed, 2024-03-13 at 12:50:29 +0100, Lucas Nussbaum wrote:
> > Source: geki2
> > Version: 2.0.3-10
> > Severity: serious
> > Justification: FTBFS
> > Tags: trixie sid ftbfs
> > User: lu...@debian.org
> > Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef
> 
> > 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 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
> > > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"geki2-KXL\" 
> > > -DVERSION=\"2.0.3\" -DHAVE_LIBKXL=1 -DHAVE_LIBKXL=1 -DHAVE_SYS_TYPES_H=1 
> > > -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
> > > -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
> > > -DHAVE_UNISTD_H=1 -DHAVE_UNISTD_H=1 
> > > -DDATA_PATH=\"/usr/share/games/geki2/data\" 
> > > -DBMP_PATH=\"/usr/share/games/geki2/bmp\" 
> > > -DWAV_PATH=\"/usr/share/games/geki2/wav\" -DTITLE=\"geki2-KXL\ 2.0.3\"  
> > > -I. -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
> > > -Werror=implicit-function-declaration 
> > > -ffile-prefix-map=/<>=. -fstack-protector-strong 
> > > -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection 
> > > -c misc.c
> > > misc.c: In function ‘ClearAndGameOver’:
> > > misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ 
> > > [-Werror=implicit-function-declaration]
> > >   127 |   ScoreRanking();
> > >   |   ^~~~
> > > misc.c:132:5: error: implicit declaration of function ‘UnLoadStageData’; 
> > > did you mean ‘LoadStageData’? [-Werror=implicit-function-declaration]
> > >   132 | UnLoadStageData();
> > >   | ^~~
> > >   | LoadStageData
> > > cc1: some warnings being treated as errors
> > > make[2]: *** [Makefile:233: misc.o] Error 1
> 
> The attached debdiff patch should fix the build.

Actually, the attached debdiff should be better (properly split
patches).

Thanks,
Guillem
diff -Nru geki2-2.0.3/debian/patches/020_headers.diff 
geki2-2.0.3/debian/patches/020_headers.diff
--- geki2-2.0.3/debian/patches/020_headers.diff 2018-05-13 16:22:49.0 
+0200
+++ geki2-2.0.3/debian/patches/020_headers.diff 2024-05-03 13:00:11.0 
+0200
@@ -4,29 +4,25 @@
 
 ===
 ---
- src/geki2.h   | 1 +
- src/ranking.c | 1 +
- 2 files changed, 2 insertions(+)
+ src/geki2.h   |3 +++
+ src/load.c|2 +-
+ src/load.h|1 +
+ src/ranking.c |1 +
+ src/ranking.h |2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
 
-diff --git a/src/geki2.h b/src/geki2.h
-index 938d760..b293afb 100644
 --- a/src/geki2.h
 +++ b/src/geki2.h
-@@ -9,6 +9,7 @@
+@@ -7,9 +7,12 @@
+ #ifndef _GEKI2_H_
+ #define _GEKI2_H_
  
++#include 
  #include 
  #include 
 +#include 
  #include 
++#include 
  #include 
  #include 
-diff --git a/src/ranking.c b/src/ranking.c
-index a6683c5..4e3df6c 100644
 a/src/ranking.c
-+++ b/src/ranking.c
-@@ -1,4 +1,5 @@
- #include 
-+#include 
- #include "geki2.h"
- #include "extern.h"
  
diff -Nru geki2-2.0.3/debian/patches/020_implicit-decl.patch 
geki2-2.0.3/debian/patches/020_implicit-decl.patch
--- geki2-2.0.3/debian/patches/020_implicit-decl.patch  1970-01-01 
01:00:00.0 +0100
+++ geki2-2.0.3/debian/patches/020_implicit-decl.patch  2024-05-03 
12:59:08.0 +0200
@@ -0,0 +1,47 @@
+Description: And and fix function declarations
+ With the compiler now dafeaulting to -Werror=implicit-function-declaration,
+ we need to properly declare all functions in the relevant headers.
+Author: Guillem Jover 
+Origin: vendor
+Forwarded: no
+
+===
+---
+ src/geki2.h   |3 +++
+ src/load.c|2 +-
+ src/load.h|1 +
+ src/ranking.c |1 +
+ src/ranking.h |2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
+
+--- a/src/load.c
 b/src/load.c
+@@ -237,7 +237,7 @@ void LoadStageData(void)
+ /**
+   ���ơǡ��
+  **/
+-void UnLoadStageData()
++void UnLoadStageData(void)
+ {
+   Uint8 bossmax[] = {2, 3 * 2, 1 * 2, 1 * 2, 1 * 2, 1 * 2};
+   Uint8 backmax[] = {7, 16, 20, 8, 18, 15};
+--- a/src/load.h
 b/src/load.h
+@@ -9,5 +9,6 @@ void UnLoadPixmaps(PixData **my, int max
+ void CreatePixmap(void);
+ void DeletePixmap(void);
+ void LoadStageData(void);
++void UnLoadStageData(void);
+ 
+ #endif
+--- a/src/ranking.h
 b/src/ranking.h
+@@ -1,7 +1,7 @@
+ #ifndef _RANKING_H_
+ #define _RANKING_H_
+ 
+-void RankingScore(void);
++int ScoreRanking(void);
+ void ReadScore(void);
+ void 

Bug#1066549: geki2: FTBFS: misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]

2024-05-03 Thread Guillem Jover
Control: tag -1 patch

Hi!

On Wed, 2024-03-13 at 12:50:29 +0100, Lucas Nussbaum wrote:
> Source: geki2
> Version: 2.0.3-10
> Severity: serious
> Justification: FTBFS
> Tags: trixie sid ftbfs
> User: lu...@debian.org
> Usertags: ftbfs-20240313 ftbfs-trixie ftbfs-impfuncdef

> 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 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
> > -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"geki2-KXL\" 
> > -DVERSION=\"2.0.3\" -DHAVE_LIBKXL=1 -DHAVE_LIBKXL=1 -DHAVE_SYS_TYPES_H=1 
> > -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
> > -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
> > -DHAVE_UNISTD_H=1 -DDATA_PATH=\"/usr/share/games/geki2/data\" 
> > -DBMP_PATH=\"/usr/share/games/geki2/bmp\" 
> > -DWAV_PATH=\"/usr/share/games/geki2/wav\" -DTITLE=\"geki2-KXL\ 2.0.3\"  -I. 
> > -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
> > -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> > -fstack-protector-strong -fstack-clash-protection -Wformat 
> > -Werror=format-security -fcf-protection -c misc.c
> > misc.c: In function ‘ClearAndGameOver’:
> > misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ 
> > [-Werror=implicit-function-declaration]
> >   127 |   ScoreRanking();
> >   |   ^~~~
> > misc.c:132:5: error: implicit declaration of function ‘UnLoadStageData’; 
> > did you mean ‘LoadStageData’? [-Werror=implicit-function-declaration]
> >   132 | UnLoadStageData();
> >   | ^~~
> >   | LoadStageData
> > cc1: some warnings being treated as errors
> > make[2]: *** [Makefile:233: misc.o] Error 1

The attached debdiff patch should fix the build.

Thanks,
Guillem
diff -Nru geki2-2.0.3/debian/patches/020_headers.diff 
geki2-2.0.3/debian/patches/020_headers.diff
--- geki2-2.0.3/debian/patches/020_headers.diff 2018-05-13 16:22:49.0 
+0200
+++ geki2-2.0.3/debian/patches/020_headers.diff 2024-05-03 12:36:38.0 
+0200
@@ -4,24 +4,28 @@
 
 ===
 ---
- src/geki2.h   | 1 +
- src/ranking.c | 1 +
- 2 files changed, 2 insertions(+)
+ src/geki2.h   |3 +++
+ src/load.c|2 +-
+ src/load.h|1 +
+ src/ranking.c |1 +
+ src/ranking.h |2 +-
+ 5 files changed, 7 insertions(+), 2 deletions(-)
 
-diff --git a/src/geki2.h b/src/geki2.h
-index 938d760..b293afb 100644
 --- a/src/geki2.h
 +++ b/src/geki2.h
-@@ -9,6 +9,7 @@
+@@ -7,9 +7,12 @@
+ #ifndef _GEKI2_H_
+ #define _GEKI2_H_
  
++#include 
  #include 
  #include 
 +#include 
  #include 
++#include 
  #include 
  #include 
-diff --git a/src/ranking.c b/src/ranking.c
-index a6683c5..4e3df6c 100644
+ 
 --- a/src/ranking.c
 +++ b/src/ranking.c
 @@ -1,4 +1,5 @@
@@ -30,3 +34,34 @@
  #include "geki2.h"
  #include "extern.h"
  
+--- a/src/load.c
 b/src/load.c
+@@ -237,7 +237,7 @@ void LoadStageData(void)
+ /**
+   ���ơǡ��
+  **/
+-void UnLoadStageData()
++void UnLoadStageData(void)
+ {
+   Uint8 bossmax[] = {2, 3 * 2, 1 * 2, 1 * 2, 1 * 2, 1 * 2};
+   Uint8 backmax[] = {7, 16, 20, 8, 18, 15};
+--- a/src/load.h
 b/src/load.h
+@@ -9,5 +9,6 @@ void UnLoadPixmaps(PixData **my, int max
+ void CreatePixmap(void);
+ void DeletePixmap(void);
+ void LoadStageData(void);
++void UnLoadStageData(void);
+ 
+ #endif
+--- a/src/ranking.h
 b/src/ranking.h
+@@ -1,7 +1,7 @@
+ #ifndef _RANKING_H_
+ #define _RANKING_H_
+ 
+-void RankingScore(void);
++int ScoreRanking(void);
+ void ReadScore(void);
+ void WriteScore(void);
+ 
diff -Nru geki2-2.0.3/debian/patches/020_score_path.diff 
geki2-2.0.3/debian/patches/020_score_path.diff
--- geki2-2.0.3/debian/patches/020_score_path.diff  2018-05-13 
16:22:49.0 +0200
+++ geki2-2.0.3/debian/patches/020_score_path.diff  2024-05-03 
12:37:05.0 +0200
@@ -4,11 +4,9 @@
 
 ===
 ---
- src/ranking.c | 4 ++--
+ src/ranking.c |4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
-diff --git a/src/ranking.c b/src/ranking.c
-index 2ed04af..fe3f4fc 100644
 --- a/src/ranking.c
 +++ b/src/ranking.c
 @@ -38,7 +38,7 @@ void ReadScore(void)
diff -Nru geki2-2.0.3/debian/patches/020_shot_keys.diff 
geki2-2.0.3/debian/patches/020_shot_keys.diff
--- geki2-2.0.3/debian/patches/020_shot_keys.diff   2018-05-13 
16:22:49.0 +0200
+++ geki2-2.0.3/debian/patches/020_shot_keys.diff   2024-05-03 
12:37:35.0 +0200
@@ -4,16 +4,14 @@
 
 ===
 ---
- src/geki2.h   | 2 ++
- 

Processed: Re: Bug#1066549: geki2: FTBFS: misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]

2024-05-03 Thread Debian Bug Tracking System
Processing control commands:

> tag -1 patch
Bug #1066549 [src:geki2] geki2: FTBFS: misc.c:127:7: error: implicit 
declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]
Added tag(s) patch.

-- 
1066549: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1066549
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Bug#1066549: geki2: FTBFS: misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]

2024-03-13 Thread Lucas Nussbaum
Source: geki2
Version: 2.0.3-10
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 -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" 
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"geki2-KXL\" 
> -DVERSION=\"2.0.3\" -DHAVE_LIBKXL=1 -DHAVE_LIBKXL=1 -DHAVE_SYS_TYPES_H=1 
> -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 
> -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 
> -DHAVE_UNISTD_H=1 -DDATA_PATH=\"/usr/share/games/geki2/data\" 
> -DBMP_PATH=\"/usr/share/games/geki2/bmp\" 
> -DWAV_PATH=\"/usr/share/games/geki2/wav\" -DTITLE=\"geki2-KXL\ 2.0.3\"  -I. 
> -I.   -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 
> -Werror=implicit-function-declaration -ffile-prefix-map=/<>=. 
> -fstack-protector-strong -fstack-clash-protection -Wformat 
> -Werror=format-security -fcf-protection -c misc.c
> misc.c: In function ‘ClearAndGameOver’:
> misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ 
> [-Werror=implicit-function-declaration]
>   127 |   ScoreRanking();
>   |   ^~~~
> misc.c:132:5: error: implicit declaration of function ‘UnLoadStageData’; did 
> you mean ‘LoadStageData’? [-Werror=implicit-function-declaration]
>   132 | UnLoadStageData();
>   | ^~~
>   | LoadStageData
> cc1: some warnings being treated as errors
> make[2]: *** [Makefile:233: misc.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2024/03/13/geki2_2.0.3-10_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20240313;users=lu...@debian.org
or:
https://udd.debian.org/bugs/?release=na=ign=7=7=only=ftbfs-20240313=lu...@debian.org=1=1=1=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.