Skip to content

incompatible type passing H5Eprint2() into H5Eset_auto2() #4698

@bozhang-hpc

Description

@bozhang-hpc

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

Metadata

Metadata

Assignees

Labels

Component - C LibraryCore C library issues (usually in the src directory)

Type

Projects

Status

Planning

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions