#1078231 kcemu: FTBFS with GCC 14: assignment to ... from incompatible pointer type ...

Package:
src:kcemu
Source:
src:kcemu
Submitter:
Andreas Beckmann
Date:
2025-09-02 11:53:01 UTC
Severity:
normal
Tags:
#1078231#5
Date:
2024-08-08 19:57:03 UTC
From:
To:
gcc -DHAVE_CONFIG_H -I. -I../../include/kc  -I../../include -DDEBUG -DLINUX -Wdate-time -D_FORTIFY_SOURCE=2  -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/build/kcemu-0.5.2+dfsg=. -fstack-protector-strong -fstack-clash-protection -Wformat -
Werror=format-security -fcf-protection -c -o load_22dsk.o load_22dsk.c
load_22dsk.c: In function 'do_open':
load_22dsk.c:163:11: error: assignment to 'struct gzFile_s **' from incompatible pointer type 'gzFile' {aka 'struct gzFile_s *'} [-Wincompatible-pointer-types]
  163 |       gzf = try_open_gzip(path);
      |           ^
load_22dsk.c:173:13: error: assignment to 'gzFile' {aka 'struct gzFile_s *'} from incompatible pointer type 'struct gzFile_s **' [-Wincompatible-pointer-types]
  173 |   data->gzf = gzf;
      |             ^
make[3]: *** [Makefile:538: load_22dsk.o] Error 1


Andreas

#1078231#10
Date:
2025-04-02 08:50:28 UTC
From:
To:
I believe the following patch solve the release critical problem.  The
variable is only used to store a pointer received from try_open_gzip()
and passed on to data->gzf.

diff --git a/src/libdisk/load_22dsk.c b/src/libdisk/load_22dsk.c
index 5ad1447..110bc9d 100644
--- a/src/libdisk/load_22dsk.c
+++ b/src/libdisk/load_22dsk.c
@@ -135,7 +135,7 @@ do_open(const char *path)
   int ro;
   FILE *f;
   int b1, b2;
-  gzFile *gzf;
+  gzFile **gzf;
   dsk_data_t *data;

   f = NULL;

#1078231#17
Date:
2025-04-02 09:04:07 UTC
From:
To:
Hi Petter,

this has been fixed upstream and an updated Debian package is already
in the works. I have already fixed virtualjaguar, so kcemu is next.

I will also take the opportunity to clean up the package and move it
to Salsa.

Adrian

#1078231#22
Date:
2025-09-02 11:49:30 UTC
From:
To:
[John Paul Adrian Glaubitz]

Very good to hear.  I hope your effort is successful. :)

#1078231#27
Date:
2025-09-02 11:51:04 UTC
From:
To:
I have worked on it, but there is something wrong with the Git repository.

When I do a rebase, it drops one of the commits. I need to reconstruct
the Git repository starting from that commit.

Yes, I know it takes me longer than it should, but I think the repository
should be fixed before being moved to Salsa.

Adrian