Bug#1066549: geki2: FTBFS: misc.c:127:7: error: implicit declaration of function ‘ScoreRanking’ [-Werror=implicit-function-declaration]
Guillem Jover
guillem at debian.org
Fri May 3 18:21:42 BST 2024
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
-------------- next part --------------
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.000000000 +0200
+++ geki2-2.0.3/debian/patches/020_headers.diff 2024-05-03 13:00:11.000000000 +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 <string.h>
#include <stdio.h>
#include <stdlib.h>
+#include <inttypes.h>
#include <sys/types.h>
++#include <time.h>
#include <unistd.h>
#include <KXL.h>
-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 <pwd.h>
-+#include <string.h>
- #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.000000000 +0100
+++ geki2-2.0.3/debian/patches/020_implicit-decl.patch 2024-05-03 12:59:08.000000000 +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 <guillem at hadrons.org>
+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.000000000 +0200
+++ geki2-2.0.3/debian/patches/020_scanf.diff 2024-05-03 13:03:10.000000000 +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.000000000 +0200
+++ geki2-2.0.3/debian/patches/020_score_path.diff 2024-05-03 13:03:13.000000000 +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)
FILE *fp;
Uint16 i;
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.000000000 +0200
+++ geki2-2.0.3/debian/patches/020_shot_keys.diff 2024-05-03 13:03:17.000000000 +0200
@@ -4,16 +4,14 @@
===================================================================
---
- src/geki2.h | 2 ++
- src/main.c | 2 ++
- src/opening.c | 4 ++--
+ src/geki2.h | 2 ++
+ src/main.c | 2 ++
+ src/opening.c | 4 ++--
3 files changed, 6 insertions(+), 2 deletions(-)
-diff --git a/src/geki2.h b/src/geki2.h
-index b293afb..71be21e 100644
--- a/src/geki2.h
+++ b/src/geki2.h
-@@ -21,7 +21,9 @@
+@@ -23,7 +23,9 @@
#define KeyRight KXL_KEY_Right
#define KeyLeft KXL_KEY_Left
#define KeyShot KXL_KEY_z
@@ -23,8 +21,6 @@
/** ????????? **/
#define KNone 0
-diff --git a/src/main.c b/src/main.c
-index 52fb1d5..c325705 100644
--- a/src/main.c
+++ b/src/main.c
@@ -24,6 +24,7 @@ void MainLoop(void)
@@ -43,8 +39,6 @@
case KeyLeft: Root->Key &= KLeftMask; break;
case KeyRight: Root->Key &= KRightMask; break;
case KeyUp: Root->Key &= KUpMask; break;
-diff --git a/src/opening.c b/src/opening.c
-index 6b13109..9dac847 100644
--- a/src/opening.c
+++ b/src/opening.c
@@ -24,7 +24,7 @@ char *menu_str[]={
diff -Nru geki2-2.0.3/debian/patches/series geki2-2.0.3/debian/patches/series
--- geki2-2.0.3/debian/patches/series 2018-05-13 16:22:49.000000000 +0200
+++ geki2-2.0.3/debian/patches/series 2024-05-03 12:59:49.000000000 +0200
@@ -5,4 +5,5 @@
020_score_path.diff
020_shot_keys.diff
020_game.diff
+020_implicit-decl.patch
098_no_bgm_mixup.diff
More information about the Pkg-games-devel
mailing list