Skip to content

Incompatible function pointer when building with clang-16 #2715

@ufdup89

Description

@ufdup89

I am experiencing errors when compiling netcdf 4.9.2 with clang-16 and hdf5 1.14.1. Compiling with clang-15 and same hdf5 version works fine.

OS: macOS Ventura 13.4 (arm)

_ports_science_netcdf/netcdf/work/netcdf-c-4.9.2/libhdf5/hdf5open.c
/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_science_netcdf/netcdf/work/netcdf-c-4.9.2/libhdf5/hdf5open.c:2902:20: error: incompatible function pointer types passing 'int (hid_t, const char *, const H5L_info2_t *, void *)' (aka 'int (long long, const char *, const H5L_info2_t *, void *)') to parameter of type 'H5L_iterate1_t' (aka 'int (*)(long long, const char *, const H5L_info1_t *, void *)') [-Wincompatible-function-pointer-types]
                   read_hdf5_obj, (void *)&udata) < 0)
                   ^~~~~~~~~~~~~
/opt/local/include/H5Lpublic.h:1684:42: note: passing argument to parameter 'op' here
                          H5L_iterate1_t op, void *op_data);
                                         ^
1 error generated.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions