Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rest_vol_dataset: Correct treatment of dataspace types in is_contiguous() and convert_start_to_offset() #78

Merged
merged 2 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeInstallation.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ if (NOT HDF5_VOL_REST_NO_PACKAGES)
set (CPACK_NSIS_INSTALL_ROOT "$PROGRAMFILES")
set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}")
endif ()
# set the install/unistall icon used for the installer itself
# set the install/uninstall icon used for the installer itself
# There is a bug in NSI that does not handle full unix paths properly.
set (CPACK_NSIS_MUI_ICON "${HDF5_VOL_REST_RESOURCES_EXT_DIR}\\\\hdf.ico")
set (CPACK_NSIS_MUI_UNIICON "${HDF5_VOL_REST_RESOURCES_EXT_DIR}\\\\hdf.ico")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ include the flag `-H <dir>` where `dir` is the path to the HDF5 install prefix.

NOTE: For those who are capable of using both build systems, the autotools build currently
does not support out-of-tree builds. If the REST VOL source directory is used for an autotools
build, it is important not to re-use the source directory for a later build using CMake.
build, it is important not to reuse the source directory for a later build using CMake.
This can cause build conflicts and result in strange and unexpected behavior.


Expand Down
19 changes: 14 additions & 5 deletions src/rest_vol_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -4302,11 +4302,17 @@ RV_dataspace_selection_is_contiguous(hid_t space_id)
break;

case H5S_SEL_ALL:
FUNC_GOTO_DONE(TRUE);
break;

case H5S_SEL_NONE:
FUNC_GOTO_DONE(FALSE);
break;

case H5S_SEL_ERROR:
case H5S_SEL_N:
case H5S_SEL_NONE:
default:
FUNC_GOTO_DONE(TRUE);
FUNC_GOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, FAIL, "specified unsupported dataspace type");
} /* end switch */

done:
Expand Down Expand Up @@ -4379,11 +4385,14 @@ RV_convert_start_to_offset(hid_t space_id)
break;

case H5S_SEL_ALL:
case H5S_SEL_NONE:
ret_value = 0;
break;

case H5S_SEL_ERROR:
case H5S_SEL_N:
case H5S_SEL_NONE:
default:
ret_value = 0;
FUNC_GOTO_ERROR(H5E_DATASPACE, H5E_BADVALUE, -1, "specified unsupported dataspace type");
} /* end switch */

done:
Expand Down Expand Up @@ -4503,4 +4512,4 @@ RV_json_values_to_binary_callback(char *HTTP_response, void *callback_data_in, v
RV_free(value_buffer);

return ret_value;
}
}