#2871: EOS_Omni's nuceos code used int to hold hid_t values
Reporter:Roland Haas
Status:new
Milestone:
Version:
Type:bug
Priority:major
Component:EinsteinToolkit thorn

EOS_Omni contains this code:

// If on the IO proc (doIO == True) actually perform HDF5 IO, catch possible
// HDF5 errors
#define HDF5_DO_IO(fn_call)                                              \
  if(doIO) {                                                             \
    int _error_code = fn_call;                                           \
    if (_error_code < 0) {                                               \
      CCTK_VError(__LINE__, __FILE__, CCTK_THORNSTRING,                  \
                  "HDF5 call '%s' returned error code %d",               \
                  #fn_call, _error_code);                                \
    }                                                                    \
  }

to handle some HDF5 calls. This assigns the result of HDF5 calls (typically a hid_t type) to an int, which (as of HDF5 1.10 or so) is no longer correct since hid_t is now a 64 bit type. So this needs to be a hid_t or long long int (and some compile time check that `long long int` actually can hold a `hid_t`) instead to handle the value and output via printf.

--
Ticket URL: https://bitbucket.org/einsteintoolkit/tickets/issues/2871/eos_omnis-nuceos-code-used-int-to-hold