netcdf-c/nc_test/f03tst_open_mem.nc
Dennis Heimbigner 4b936ee26a Fix use of 'int' to represent 'hid_t' that caused HDF5 1.10 to fail.
re: github issue https://github.com/Unidata/netcdf-fortran/issues/82

This was originally discovered in the Fortran tests, but is
a problem in the C library.

The problem only occurred when using HDF5-1.10.x.  The reason it
failed is that starting with 1.10, the hid_t type was changed
from 32 bits to 64 bits.
The function libsrc4/nc4memcb.c#NC4_image_init was using type int (doh!)
to return the hdf fileid instead of hid_t type.  This, of course,
caused the id to be truncated and in turn later use of the id
caused hdf5 to fail.

Fix is trivial: replace int with hid_t. This also requires a related
change in nc4mem.c.

Also added the test case derived from the original Fortran code.

You would think I would learn...
2018-05-30 14:47:37 -06:00

6.2 KiB