HDFGroup / HDFGroup/hdf5

incompatible type passing H5Eprint2() into H5Eset_auto2()

Open
#4,698 0 comments 0 reactions 1 assignee Claimed by @bmribler View on GitHub
Component - C Library
Dominant language
C
Stars
988
Forks
355
Avg merge
4d 2h
Merged PRs (30d)
12

Description

**Describe the bug**

I'm trying to disable some error messages by `H5Eset_auto2(H5E_DEFAULT, NULL, NULL);`, but later I need to turn it on.

The second argument in `H5Eset_auto2(hid_t estack_id, H5E_auto2_t func, void *client_data)` expects `'H5E_auto2_t' {aka 'int (*)(long int, void *)'}`, but the default error print function `H5Eprint2(hid_t err_stack, FILE *stream)` is of type `‘herr_t (*)(hid_t, FILE *)’ {aka ‘int (*)(long int, FILE *)’}`

**Expected behavior**

So here looks like my `GCC/14.1.0` is complaining about the mismatch between `void*` and `FILE*`.

I expect it passes the compilation and just works.

**Platform (please complete the following information)**
- HDF5 version: `1.14.4.3`
- OS and version: `Ubuntu 24.04`
- Compiler and version: `GCC/14.1.0`
- Build system (e.g. CMake, Autotools) and version: `cmake/3.29.3`
- Any configure options you specified: `--enable-parallel`
- MPI library and version (parallel HDF5): `openmpi/5.0.3`

**Additional context**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.