mannau / h5

Interface to the HDF5 Library
Other
70 stars 22 forks source link

Typo bug? #33

Closed epipping closed 8 years ago

epipping commented 8 years ago

My compiler warns me about these lines of code:

herr_t dset_info(hid_t loc_id, const char *name, const H5L_info_t *info, void *op_data) {
  H5O_info_t infobuf;
  H5Oget_info_by_name (loc_id, name, &infobuf, H5P_DEFAULT);
  if(info->type == H5O_TYPE_DATASET) {
    ((CharacterVector *) op_data)->push_back(name);
  }
  return 0;
}

with

Group.cpp: In function ‘herr_t dset_info(hid_t, const char*, const H5L_info_t*, void*)’:
Group.cpp:107:20: warning: comparison between ‘const enum H5L_type_t’ and ‘enum H5O_type_t’ [-Wenum-compare]
   if(info->type == H5O_TYPE_DATASET) {
                    ^

Indeed, the corresponding structs seem entirely incompatible. Are these lines of code really correct?