Bug#1075308: ncl: ftbfs with GCC-14

Nilesh Patra nilesh at debian.org
Mon Aug 5 16:07:56 BST 2024


On Mon, Aug 05, 2024 at 02:53:16PM +0200, Michael R. Crusoe wrote:
> I fixed all the gcc-14 bugs in NCL that I could find, but one, in https://salsa.debian.org/science-team/ncl/-/commit/32b3ee86925703050ca330352207885e210e6e4c
> 
> > NclHDF5.c:5745:52: error: initialization of 'NhlErrorTypes (*)(void *, NclQuark,  NclQuark,  NclQuark,  NclQuark *, ng_size_t)' {aka 'enum _NhlErrType (*)(void *, long int,  long int,  long int,  long int *, long int)'} from incompatible pointer type 'NhlErrorTypes (*)(void *, NclQuark,  NclBasicDataTypes, int,  void *)' {aka 'enum _NhlErrType (*)(void *, long int, NclBasicDataTypes,  int,  void *)'} [-Wincompatible-pointer-types]
> 
> See https://salsa.debian.org/science-team/ncl/-/jobs/6077369#L27943

According to
https://salsa.debian.org/science-team/ncl/-/blob/debian/latest/ni/src/ncl/NclFileInterfaces.h?ref_type=heads#L536
the struct should have 50 values but the file which chokes has only 45.
The parameter it complains about are related to AddVlenFunc. I'm unsure
how this was working in the past. I did not find the relevant
declarations in the file for missing struct fields so adding in NULL
seems OK.

Patch below should help you move forward.

diff --git a/ni/src/ncl/NclHDF5.c b/ni/src/ncl/NclHDF5.c
index ddaf791..b93e89d 100644
--- a/ni/src/ncl/NclHDF5.c
+++ b/ni/src/ncl/NclHDF5.c
@@ -5742,6 +5742,11 @@ NclFormatFunctionRec HDF5Rec = {
 /* NclGetGrpAttNamesFunc    get_grp_att_names; */  HDF5GetGrpAttNames,
 /* NclGetGrpAttInfoFunc     get_grp_att_info; */   HDF5GetGrpAttInfo,
 /* NclAddGrpFunc           add_grp; */                  NULL,
+/* NclAddVlenFunc          add_vlen; */                 NULL,
+/* NclAddEnumFunc          add_enum; */                 NULL,
+/* NclAddOpaqueFunc        add_opaque; */               NULL,
+/* NclAddCompoundFunc      add_compound; */             NULL,
+/* NclWriteCompoundFunc    write_compound; */           NULL,
 /* NclSetOptionFunc         set_option;  */        HDF5SetOption
 };
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20240805/df9e8a3e/attachment.sig>


More information about the debian-science-maintainers mailing list