Control: tag -1 patch Hi!
On Wed, 2024-03-13 at 12:50:31 +0100, Lucas Nussbaum wrote: > Source: geki3 > Version: 1.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=\"geki3-KXL\" > > -DVERSION=\"1.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/geki3/data\" > > -DBMP_PATH=\"/usr/share/games/geki3/bmp\" > > -DWAV_PATH=\"/usr/share/games/geki3/wav\" -DTITLE=\"geki3-KXL\ 1.0.3\" -I. > > -I. -Wdate-time -D_FORTIFY_SOURCE=2 -g -O2 > > -Werror=implicit-function-declaration -ffile-prefix-map=/<<PKGBUILDDIR>>=. > > -fstack-protector-strong -fstack-clash-protection -Wformat > > -Werror=format-security -fcf-protection -c boss.c > > boss.c: In function ‘MovePenguin’: > > boss.c:205:11: error: implicit declaration of function ‘CreateEnemyBomb’; > > did you mean ‘CreateEnemyShot’? [-Werror=implicit-function-declaration] > > 205 | CreateEnemyBomb(my->X + 20, > > | ^~~~~~~~~~~~~~~ > > | CreateEnemyShot > > boss.c: In function ‘MoveTurtle’: > > boss.c:302:11: error: implicit declaration of function ‘CreateMissile’; did > > you mean ‘CreateBoss’? [-Werror=implicit-function-declaration] > > 302 | CreateMissile(my, my->X - 8, my->Y); > > | ^~~~~~~~~~~~~ > > | CreateBoss > > cc1: some warnings being treated as errors > > make[2]: *** [Makefile:233: boss.o] Error 1 The attached patch should fix this FTBFS Thanks, Guillem
diff --git c/debian/patches/020_headers.diff i/debian/patches/020_headers.diff index 106a56b..23dfadb 100644 --- c/debian/patches/020_headers.diff +++ i/debian/patches/020_headers.diff @@ -1,22 +1,19 @@ -Index: geki3-1.0.3/src/ranking.c -=================================================================== ---- geki3-1.0.3.orig/src/ranking.c 2002-08-05 12:35:58.000000000 +0200 -+++ geki3-1.0.3/src/ranking.c 2006-05-09 20:38:01.000000000 +0200 -@@ -1,4 +1,5 @@ - #include <pwd.h> -+#include <string.h> - #include "geki3.h" - #include "extern.h" - -Index: geki3-1.0.3/src/geki3.h -=================================================================== ---- geki3-1.0.3.orig/src/geki3.h 2002-08-05 12:35:58.000000000 +0200 -+++ geki3-1.0.3/src/geki3.h 2006-05-09 20:38:01.000000000 +0200 -@@ -9,6 +9,7 @@ +--- + src/geki3.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/src/geki3.h ++++ b/src/geki3.h +@@ -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 c/debian/patches/020_implicit-decl.patch i/debian/patches/020_implicit-decl.patch new file mode 100644 index 0000000..ba22660 --- /dev/null +++ i/debian/patches/020_implicit-decl.patch @@ -0,0 +1,59 @@ +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 <guil...@hadrons.org> +Origin: vendor +Forwarded: no + +--- + src/load.c | 2 +- + src/load.h | 1 + + src/ranking.h | 2 +- + src/your.h | 2 ++ + 4 files changed, 5 insertions(+), 2 deletions(-) + +--- a/src/your.h ++++ b/src/your.h +@@ -6,9 +6,11 @@ void CreateItem(Sint16 x, Sint16 y, PixD + RcHitEnum HitEnemyToBall(CharacterData *my, CharacterData *your); + + /** Bomb **/ ++void CreateEnemyBomb(Sint16 x, Sint16 y, Uint16 direction, Uint16 speed); + RcHitEnum MoveBomb(CharacterData *my); + RcHitEnum HitEnemyToBomb(CharacterData *my, CharacterData *your); + RcHitEnum MoveEnemyBomb(CharacterData *my); ++void CreateMissile(CharacterData *my, Sint16 x, Sint16 y); + RcHitEnum MoveMissile(CharacterData *my); + void CreateEnemyShot(Sint16 x, Sint16 y, Uint16 direction, Uint16 + speed, Uint8 sel); +--- a/src/load.c ++++ b/src/load.c +@@ -221,7 +221,7 @@ void LoadStageData(void) + /********************** + ¥¹¥Æ¡¼¥¸¥Ç¡¼¥¿ºï½ü + **********************/ +-void UnLoadStageData() ++void UnLoadStageData(void) + { + Uint16 bossmax[] = {3, 6, 4, 4}; + +--- a/src/load.h ++++ b/src/load.h +@@ -9,5 +9,6 @@ void UnLoadPixmaps(PixData **my, Uint16 + 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 --git c/debian/patches/020_score_path.diff i/debian/patches/020_score_path.diff index 313a0c2..b3b2dab 100644 --- c/debian/patches/020_score_path.diff +++ i/debian/patches/020_score_path.diff @@ -1,8 +1,10 @@ -Index: geki3-1.0.3/src/ranking.c -=================================================================== ---- geki3-1.0.3.orig/src/ranking.c 2006-05-09 20:42:06.000000000 +0200 -+++ geki3-1.0.3/src/ranking.c 2006-05-09 20:42:55.000000000 +0200 -@@ -38,7 +38,7 @@ +--- + src/ranking.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/src/ranking.c ++++ b/src/ranking.c +@@ -37,7 +37,7 @@ void ReadScore(void) FILE *fp; Uint16 i; @@ -11,7 +13,7 @@ Index: geki3-1.0.3/src/ranking.c fscanf(fp, "%"SCNu32, &(Root->HiScore)); for (i = 0; i < 5; i ++) fscanf(fp, "%"SCNu32" %"SCNu8" %"SCNu8" %s", -@@ -70,7 +70,7 @@ +@@ -69,7 +69,7 @@ void WriteScore(void) FILE *fp; Uint16 i; diff --git c/debian/patches/020_shot_keys.diff i/debian/patches/020_shot_keys.diff index cb35fe5..02b54f8 100644 --- c/debian/patches/020_shot_keys.diff +++ i/debian/patches/020_shot_keys.diff @@ -1,8 +1,12 @@ -Index: geki3-1.0.3/src/main.c -=================================================================== ---- geki3-1.0.3.orig/src/main.c 2002-08-05 12:35:58.000000000 +0200 -+++ geki3-1.0.3/src/main.c 2006-05-09 20:39:45.000000000 +0200 -@@ -23,6 +23,7 @@ +--- + src/geki3.h | 2 ++ + src/main.c | 2 ++ + src/opening.c | 4 ++-- + 3 files changed, 6 insertions(+), 2 deletions(-) + +--- a/src/main.c ++++ b/src/main.c +@@ -23,6 +23,7 @@ void MainLoop(void) case KXL_EVENT_KEY_PRESS: /*¥¡¼²¡¤·¤¿*/ switch (KXL_GetKey()) { case KeyShot: Root->Key |= KShot; break; @@ -10,7 +14,7 @@ Index: geki3-1.0.3/src/main.c case KeyLeft: Root->Key |= KLeft; break; case KeyRight: Root->Key |= KRight; break; case KeyUp: Root->Key |= KUp; break; -@@ -34,6 +35,7 @@ +@@ -34,6 +35,7 @@ void MainLoop(void) case KXL_EVENT_KEY_RELEASE: /*¥¡¼Î¥¤·¤¿*/ switch (KXL_GetKey()) { case KeyShot: Root->Key &= KShotMask; break; @@ -18,11 +22,9 @@ Index: geki3-1.0.3/src/main.c case KeyLeft: Root->Key &= KLeftMask; break; case KeyRight: Root->Key &= KRightMask; break; case KeyUp: Root->Key &= KUpMask; break; -Index: geki3-1.0.3/src/opening.c -=================================================================== ---- geki3-1.0.3.orig/src/opening.c 2002-08-05 12:35:58.000000000 +0200 -+++ geki3-1.0.3/src/opening.c 2006-05-09 20:39:45.000000000 +0200 -@@ -24,7 +24,7 @@ +--- a/src/opening.c ++++ b/src/opening.c +@@ -24,7 +24,7 @@ char *menu_str[]={ " ", " ", "move - Cursor Up or Down", @@ -31,7 +33,7 @@ Index: geki3-1.0.3/src/opening.c "" }; char *key_str[] = { -@@ -34,7 +34,7 @@ +@@ -34,7 +34,7 @@ char *key_str[] = { "Down - Cursor Down ", "Right - Cursor Right", "Left - Cursor Left ", @@ -40,11 +42,9 @@ Index: geki3-1.0.3/src/opening.c "Pause - s ", "" }; -Index: geki3-1.0.3/src/geki3.h -=================================================================== ---- geki3-1.0.3.orig/src/geki3.h 2006-05-09 20:38:01.000000000 +0200 -+++ geki3-1.0.3/src/geki3.h 2006-05-09 20:39:45.000000000 +0200 -@@ -20,7 +20,9 @@ +--- a/src/geki3.h ++++ b/src/geki3.h +@@ -22,7 +22,9 @@ #define KeyRight KXL_KEY_Right #define KeyLeft KXL_KEY_Left #define KeyShot KXL_KEY_z diff --git c/debian/patches/series i/debian/patches/series index ca12dcf..9be4265 100644 --- c/debian/patches/series +++ i/debian/patches/series @@ -5,3 +5,4 @@ 020_score_path.diff 020_shot_keys.diff 020_game.diff +020_implicit-decl.patch