Bug#1074988: gerris: ftbfs with GCC-14

Stephane Popinet popinet at basilisk.fr
Sun Nov 24 15:48:31 GMT 2024


Hi Drew,

Here is another patch which should fix this problem.

Stephane

On 11/23/24 18:34, Drew Parsons wrote:
> Source: gerris
> Version: 20131206+dfsg-19.1
> Followup-For: Bug #1074988
> 
> Unfortunately that patch is not sufficient.
> 
> /bin/bash ../libtool --silent  --tag=CC   --mode=compile mpicc -DHAVE_CONFIG_H -I. -I.. -I../src -I/usr/include -DG_LOG_DOMAIN=\"Gfs-modules\" -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
>   -I/usr/include/sysprof-6 -pthread  -DGFS_MODULES_DIR=\"/usr/lib/x86_64-linux-gnu/gerris\" -Wdate-time -D_FORTIFY_SOURCE=2  -I/usr/include -DFTT_2D=1 -g -O2 -Werror=implicit-function-declaration -ffile-prefix-ma
> p=/home/drew/projects/misc/build/gerris=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -D_XOPEN_SOURCE=700 -D_BSD_SOURCE -D_GNU_SOURCE -Wall -Werror-implicit
> -function-declaration -Wmissing-prototypes -Wmissing-declarations -pipe -std=c99 -c -o libbubbles2D_la-bubbles.lo `test -f 'bubbles.c' || echo './'`bubbles.c
> In file included from /usr/include/x86_64-linux-gnu/bits/libc-header-start.h:33,
>                   from /usr/include/stdio.h:28,
>                   from /usr/include/gts.h:23,
>                   from ../src/event.h:27,
>                   from ../src/particle.h:27,
>                   from particulatecommon.h:20,
>                   from bubbles.c:20:
> /usr/include/features.h:197:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
>    197 | # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
>        |   ^~~~~~~
> bubbles.c: In function 'bubble_fraction_init':
> bubbles.c:421:48: error: assignment to 'void (*)(FttCell *, GfsVariable *, GfsParticulate *)' {aka 'void (*)(struct _FttCell *, struct _GfsVariable *, struct _GfsParticulate *)'} from incompatible pointer type 'void (*)(FttCell *, BubbleData *)' {aka 'void (*)(struct _FttCell *, BubbleData *)'} [-Wincompatible-pointer-types]
>    421 |   GFS_PARTICULATE_FIELD (v)->voidfraction_func = voidfraction_from_bubbles;
>        |                                                ^
> bubbles.c: In function 'bubble_fraction_dt_init':
> bubbles.c:474:48: error: assignment to 'void (*)(FttCell *, GfsVariable *, GfsParticulate *)' {aka 'void (*)(struct _FttCell *, struct _GfsVariable *, struct _GfsParticulate *)'} from incompatible pointer type 'void (*)(FttCell *, BubbleData *)' {aka 'void (*)(struct _FttCell *, BubbleData *)'} [-Wincompatible-pointer-types]
>    474 |   GFS_PARTICULATE_FIELD (o)->voidfraction_func = dVpdt_from_particles;
>        |                                                ^
> make[4]: *** [Makefile:1253: libbubbles2D_la-bubbles.lo] Error 1
> make[4]: Leaving directory '/home/drew/projects/misc/build/gerris/modules'
> 
> 
-------------- next part --------------
--- ../gerris-snapshot-131206/modules/bubbles.c	2013-12-06 16:51:21.000000000 +0100
+++ modules/bubbles.c	2024-11-24 16:43:35.105886118 +0100
@@ -418,7 +418,8 @@ static void bubble_fraction_write (GtsOb
 static void bubble_fraction_init (GfsVariable * v)
 {
   v->units = 0.;
-  GFS_PARTICULATE_FIELD (v)->voidfraction_func = voidfraction_from_bubbles;
+  GFS_PARTICULATE_FIELD (v)->voidfraction_func =
+    (void (*)(FttCell *, GfsVariable *, GfsParticulate *)) voidfraction_from_bubbles;
   GFS_BUBBLE_FRACTION (v)->kernel_function = gfs_function_new (gfs_function_spatial_class (), 0.);
 }
 
@@ -471,7 +472,8 @@ static void dVpdt_from_particles (FttCel
 
 static void bubble_fraction_dt_init (GtsObject * o)
 {
-  GFS_PARTICULATE_FIELD (o)->voidfraction_func = dVpdt_from_particles;
+  GFS_PARTICULATE_FIELD (o)->voidfraction_func =
+    (void (*)(FttCell *, GfsVariable *, GfsParticulate *)) dVpdt_from_particles;
 }
 
 GfsVariableClass * gfs_bubble_fraction_dt_class (void)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0x78F22AD6304D74BE.asc
Type: application/pgp-keys
Size: 2452 bytes
Desc: OpenPGP public key
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20241124/3fe0d8e6/attachment.asc>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 665 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20241124/3fe0d8e6/attachment.sig>


More information about the debian-science-maintainers mailing list