summaryrefslogtreecommitdiffstats
path: root/tools/src/h5diff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/src/h5diff')
-rw-r--r--tools/src/h5diff/CMakeLists.txt2
-rw-r--r--tools/src/h5diff/h5diff_common.c45
-rw-r--r--tools/src/h5diff/ph5diff_main.c3
3 files changed, 26 insertions, 24 deletions
diff --git a/tools/src/h5diff/CMakeLists.txt b/tools/src/h5diff/CMakeLists.txt
index 96ed6ad..c1021e4 100644
--- a/tools/src/h5diff/CMakeLists.txt
+++ b/tools/src/h5diff/CMakeLists.txt
@@ -10,6 +10,7 @@ if (NOT ONLY_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
target_include_directories (h5diff PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ #target_compile_definitions(h5diff PRIVATE H5_TOOLS_DEBUG)
TARGET_C_PROPERTIES (h5diff STATIC)
target_link_libraries (h5diff PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_LIB_TARGET})
set_target_properties (h5diff PROPERTIES FOLDER tools)
@@ -23,6 +24,7 @@ if (BUILD_SHARED_LIBS)
${HDF5_TOOLS_SRC_H5DIFF_SOURCE_DIR}/h5diff_main.c
)
target_include_directories (h5diff-shared PRIVATE "${HDF5_TOOLS_DIR}/lib;${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+ #target_compile_definitions(h5diff-shared PRIVATE H5_TOOLS_DEBUG)
TARGET_C_PROPERTIES (h5diff-shared SHARED)
target_link_libraries (h5diff-shared PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_LIBSH_TARGET})
set_target_properties (h5diff-shared PROPERTIES FOLDER tools)
diff --git a/tools/src/h5diff/h5diff_common.c b/tools/src/h5diff/h5diff_common.c
index 362e3f2..e05a8e3 100644
--- a/tools/src/h5diff/h5diff_common.c
+++ b/tools/src/h5diff/h5diff_common.c
@@ -302,30 +302,29 @@ void parse_command_line(int argc,
*
*-------------------------------------------------------------------------
*/
+void print_info(diff_opt_t* opts)
+{
+ if (opts->m_quiet || opts->err_stat)
+ return;
+
+ if (opts->cmn_objs == 0) {
+ HDprintf("No common objects found. Files are not comparable.\n");
+ if (!opts->m_verbose)
+ HDprintf("Use -v for a list of objects.\n");
+ }
- void print_info(diff_opt_t* opts)
- {
- if (opts->m_quiet || opts->err_stat)
- return;
-
- if (opts->cmn_objs == 0) {
- HDprintf("No common objects found. Files are not comparable.\n");
- if (!opts->m_verbose)
- HDprintf("Use -v for a list of objects.\n");
- }
-
- if (opts->not_cmp == 1) {
- if (opts->m_list_not_cmp == 0) {
- HDprintf("--------------------------------\n");
- HDprintf("Some objects are not comparable\n");
- HDprintf("--------------------------------\n");
- if (opts->m_verbose)
- HDprintf("Use -c for a list of objects without details of differences.\n");
- else
- HDprintf("Use -c for a list of objects.\n");
- }
- }
- }
+ if (opts->not_cmp == 1) {
+ if (opts->m_list_not_cmp == 0) {
+ HDprintf("--------------------------------\n");
+ HDprintf("Some objects are not comparable\n");
+ HDprintf("--------------------------------\n");
+ if (opts->m_verbose)
+ HDprintf("Use -c for a list of objects without details of differences.\n");
+ else
+ HDprintf("Use -c for a list of objects.\n");
+ }
+ }
+}
/*-------------------------------------------------------------------------
* Function: check_n_input
diff --git a/tools/src/h5diff/ph5diff_main.c b/tools/src/h5diff/ph5diff_main.c
index 380ab3b..5ba5fb3 100644
--- a/tools/src/h5diff/ph5diff_main.c
+++ b/tools/src/h5diff/ph5diff_main.c
@@ -126,7 +126,8 @@ int main(int argc, const char *argv[])
static void
ph5diff_worker(int nID)
{
- hid_t file1_id = -1, file2_id = -1;
+ hid_t file1_id = H5I_INVALID_HID;
+ hid_t file2_id = H5I_INVALID_HID;
while(1)
{