diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2015-06-11 19:18:52 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2015-06-11 19:18:52 (GMT) |
commit | aa4e3e3985e1e2715819c326d332e1569ac73c7b (patch) | |
tree | 77a9a9305e54d10f2937f142e4568395ee0f9208 /test | |
parent | bf8942c7e9213355515344f21c8df7fd2987f09d (diff) | |
parent | b9f2a18b5ae9adf23cac4c0336291373a25f0721 (diff) | |
download | hdf5-aa4e3e3985e1e2715819c326d332e1569ac73c7b.zip hdf5-aa4e3e3985e1e2715819c326d332e1569ac73c7b.tar.gz hdf5-aa4e3e3985e1e2715819c326d332e1569ac73c7b.tar.bz2 |
[svn-r27191] Merged r26781 to r27185 from trunk
Tested on: 64-bit Ubuntu Linux VM w/ gcc 4.8.2
(C++ and Fortran 2003 also tested)
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeLists.txt | 6 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 47 | ||||
-rw-r--r-- | test/app_ref.c | 2 | ||||
-rw-r--r-- | test/cache.c | 50 | ||||
-rw-r--r-- | test/cache_common.c | 26 | ||||
-rw-r--r-- | test/dsets.c | 42 | ||||
-rw-r--r-- | test/dt_arith.c | 6 | ||||
-rw-r--r-- | test/dtypes.c | 12 | ||||
-rw-r--r-- | test/earray.c | 22 | ||||
-rw-r--r-- | test/error_test.c | 2 | ||||
-rw-r--r-- | test/farray.c | 14 | ||||
-rw-r--r-- | test/fheap.c | 14 | ||||
-rw-r--r-- | test/fillval.c | 2 | ||||
-rw-r--r-- | test/filter_fail.c | 4 | ||||
-rw-r--r-- | test/freespace.c | 8 | ||||
-rw-r--r-- | test/gen_filters.c | 6 | ||||
-rw-r--r-- | test/h5test.c | 162 | ||||
-rw-r--r-- | test/links.c | 68 | ||||
-rw-r--r-- | test/objcopy.c | 2 | ||||
-rw-r--r-- | test/tattr.c | 6 | ||||
-rw-r--r-- | test/tcheck_version.c | 4 | ||||
-rw-r--r-- | test/tgenprop.c | 4 | ||||
-rw-r--r-- | test/tid.c | 2 | ||||
-rw-r--r-- | test/titerate.c | 6 | ||||
-rw-r--r-- | test/tmisc.c | 4 | ||||
-rw-r--r-- | test/trefer.c | 2 | ||||
-rw-r--r-- | test/tselect.c | 12 | ||||
-rw-r--r-- | test/tskiplist.c | 4 | ||||
-rw-r--r-- | test/ttsafe_cancel.c | 6 | ||||
-rw-r--r-- | test/ttsafe_error.c | 6 | ||||
-rw-r--r-- | test/tunicode.c | 6 | ||||
-rw-r--r-- | test/unregister.c | 6 |
32 files changed, 284 insertions, 279 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 950b7cf..cb3361f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -85,7 +85,7 @@ if (BUILD_SHARED_LIBS) TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>" "${CMAKE_BINARY_DIR}/testdir1/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>" ) @@ -116,7 +116,7 @@ if (BUILD_SHARED_LIBS) TARGET ${HDF5_TEST_PLUGIN_LIB_TARGET} POST_BUILD COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different + ARGS -E copy_if_different "$<TARGET_FILE:${HDF5_TEST_PLUGIN_LIB_TARGET}>" "${CMAKE_BINARY_DIR}/testdir2/$<TARGET_FILE_NAME:${HDF5_TEST_PLUGIN_LIB_TARGET}>" ) @@ -294,7 +294,7 @@ set_target_properties (links_env PROPERTIES FOLDER test) #-- Adding test for libinfo set (GREP_RUNNER ${PROJECT_BINARY_DIR}/GrepRunner.cmake) -file (WRITE ${GREP_RUNNER} +file (WRITE ${GREP_RUNNER} "file (STRINGS \${TEST_PROGRAM} TEST_RESULT REGEX \"SUMMARY OF THE HDF5 CONFIGURATION\") if (\${TEST_RESULT} STREQUAL \"0\") message (FATAL_ERROR \"Failed: The output: \${TEST_RESULT} of \${TEST_PROGRAM} did not contain SUMMARY OF THE HDF5 CONFIGURATION\") diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index c630501..30e7318 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -204,7 +204,7 @@ endif (HDF5_TEST_VFD) add_test ( NAME H5TEST-clear-testhdf5-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove coord.h5 dtypes10.h5 sys_file1 @@ -259,7 +259,7 @@ else (HDF5_ENABLE_USING_MEMCHECKER) WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) endif (HDF5_ENABLE_USING_MEMCHECKER) - + ############################################################################## ############################################################################## ### T H E T E S T S M A C R O S ### @@ -270,7 +270,7 @@ endif (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5TEST-clear-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove dt_arith1.h5 dt_arith2.h5 dtransform.h5 @@ -336,9 +336,16 @@ add_test ( ) foreach (test ${H5_TESTS}) - add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>) + if (${test} STREQUAL "big" AND CYGWIN) + add_test ( + NAME H5TEST-${test} + COMMAND ${CMAKE_COMMAND} -E echo "SKIP ${test}" + ) + else (${test} STREQUAL "big" AND CYGWIN) + add_test (NAME H5TEST-${test} COMMAND $<TARGET_FILE:${test}>) + endif (${test} STREQUAL "big" AND CYGWIN) set_tests_properties (H5TEST-${test} PROPERTIES - DEPENDS H5TEST-clear-objects + DEPENDS H5TEST-clear-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -359,7 +366,7 @@ set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) add_test ( NAME H5TEST-clear-cache-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST @@ -375,14 +382,14 @@ set_tests_properties (H5TEST-cache PROPERTIES add_test ( NAME H5TEST-clear-cache_api-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove cache_api_test.h5 WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) add_test (NAME H5TEST-cache_api COMMAND $<TARGET_FILE:cache_api>) set_tests_properties (H5TEST-cache_api PROPERTIES - DEPENDS H5TEST-clear-cache_api-objects + DEPENDS H5TEST-clear-cache_api-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) @@ -391,7 +398,7 @@ set_tests_properties (H5TEST-cache_api PROPERTIES add_test ( NAME H5TEST-clear-cache_tagging-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove tagging_test.h5 tagging_ext_test.h5 WORKING_DIRECTORY @@ -408,7 +415,7 @@ set_tests_properties (H5TEST-cache_tagging PROPERTIES add_test ( NAME H5TEST-clear-ttsafe-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove ttsafe_error.h5 ttsafe_dcreate.h5 ttsafe_cancel.h5 @@ -428,7 +435,7 @@ if (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-err_compat-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove err_compat.txt err_compat.txt.err WORKING_DIRECTORY @@ -455,7 +462,7 @@ endif (HDF5_ENABLE_DEPRECATED_SYMBOLS) add_test ( NAME H5TEST-clear-error_test-objects COMMAND ${CMAKE_COMMAND} - -E remove + -E remove error_test.txt error_test.txt.err WORKING_DIRECTORY @@ -471,7 +478,7 @@ add_test (NAME H5TEST-error_test COMMAND "${CMAKE_COMMAND}" -D "TEST_FOLDER=${PROJECT_BINARY_DIR}/H5TEST" -P "${HDF_RESOURCES_EXT_DIR}/runTest.cmake" ) -set_tests_properties (H5TEST-error_test PROPERTIES +set_tests_properties (H5TEST-error_test PROPERTIES DEPENDS H5TEST-clear-error_test-objects ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5_PLUGIN_PRELOAD=::" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST @@ -483,7 +490,7 @@ add_test ( COMMAND ${CMAKE_COMMAND} -E remove links_env.txt - links_env.txt.err + links_env.txt.err extlinks_env0.h5 extlinks_env1.h5 tmp/extlinks_env1.h5 @@ -611,7 +618,7 @@ if (HDF5_TEST_VFD) if (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") if (NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>" -D "TEST_ARGS:STRING=" @@ -633,7 +640,7 @@ if (HDF5_TEST_VFD) endif(NOT BUILD_SHARED_LIBS AND NOT CMAKE_BUILD_TYPE MATCHES Debug) else (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>" -D "TEST_ARGS:STRING=" @@ -650,7 +657,7 @@ if (HDF5_TEST_VFD) endif (${vfdname} STREQUAL "multi" OR ${vfdname} STREQUAL "split") else (${vfdtest} STREQUAL "flush1" OR ${vfdtest} STREQUAL "flush2") add_test ( - NAME VFD-${vfdname}-${vfdtest} + NAME VFD-${vfdname}-${vfdtest} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:${vfdtest}>" -D "TEST_ARGS:STRING=" @@ -673,7 +680,7 @@ if (HDF5_TEST_VFD) CHECK_VFD_TEST (${test} ${vfdname} ${resultcode}) else (WIN32) add_test ( - NAME VFD-${vfdname}-${test} + NAME VFD-${vfdname}-${test} COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:${test}>" -D "TEST_ARGS:STRING=" @@ -694,7 +701,7 @@ if (HDF5_TEST_VFD) set_tests_properties (VFD-${vfdname}-flush2 PROPERTIES TIMEOUT 10) if (HDF5_TEST_FHEAP_VFD) add_test ( - NAME VFD-${vfdname}-fheap + NAME VFD-${vfdname}-fheap COMMAND "${CMAKE_COMMAND}" -D "TEST_PROGRAM=$<TARGET_FILE:fheap>" -D "TEST_ARGS:STRING=" @@ -711,7 +718,7 @@ if (HDF5_TEST_VFD) ) endif (HDF5_TEST_FHEAP_VFD) ENDMACRO (ADD_VFD_TEST) - + # Run test with different Virtual File Driver foreach (vfd ${VFD_LIST}) ADD_VFD_TEST (${vfd} 0) diff --git a/test/app_ref.c b/test/app_ref.c index 611d255..3052df7 100644 --- a/test/app_ref.c +++ b/test/app_ref.c @@ -80,7 +80,7 @@ void Abrt_Handler (int sig); /* Handler for SIGABRT - prints the reference count on each id */ void -Abrt_Handler (int UNUSED sig) +Abrt_Handler (int H5_ATTR_UNUSED sig) { int i, n; diff --git a/test/cache.c b/test/cache.c index eb17fcc..9bf225e 100644 --- a/test/cache.c +++ b/test/cache.c @@ -271,7 +271,7 @@ smoke_check_1(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -289,7 +289,7 @@ smoke_check_1(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_backward(/* file_ptr */ file_ptr, + row_major_scan_backward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -307,7 +307,7 @@ smoke_check_1(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -336,7 +336,7 @@ smoke_check_1(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - col_major_scan_forward(/* file_ptr */ file_ptr, + col_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -360,7 +360,7 @@ smoke_check_1(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - col_major_scan_backward(/* file_ptr */ file_ptr, + col_major_scan_backward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -456,7 +456,7 @@ smoke_check_2(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -474,7 +474,7 @@ smoke_check_2(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_backward(/* file_ptr */ file_ptr, + row_major_scan_backward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -492,7 +492,7 @@ smoke_check_2(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -521,7 +521,7 @@ smoke_check_2(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - col_major_scan_forward(/* file_ptr */ file_ptr, + col_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -545,7 +545,7 @@ smoke_check_2(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - col_major_scan_backward(/* file_ptr */ file_ptr, + col_major_scan_backward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -640,7 +640,7 @@ smoke_check_3(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -825,7 +825,7 @@ smoke_check_4(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -843,7 +843,7 @@ smoke_check_4(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_backward(/* file_ptr */ file_ptr, + row_major_scan_backward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -861,7 +861,7 @@ smoke_check_4(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - row_major_scan_forward(/* file_ptr */ file_ptr, + row_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -890,7 +890,7 @@ smoke_check_4(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - col_major_scan_forward(/* file_ptr */ file_ptr, + col_major_scan_forward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -914,7 +914,7 @@ smoke_check_4(void) HDfprintf(stdout, "%s() - %0d -- pass = %d\n", fcn_name, mile_stone++, (int)pass); - col_major_scan_backward(/* file_ptr */ file_ptr, + col_major_scan_backward(/* file_ptr */ file_ptr, /* lag */ lag, /* verbose */ FALSE, /* reset_stats */ TRUE, @@ -13206,8 +13206,8 @@ check_expunge_entry(void) */ result = H5C_get_entry_status(file_ptr, entry_ptr->addr, &entry_size, - &in_cache, &is_dirty, &is_protected, - &is_pinned, NULL, NULL); + &in_cache, &is_dirty, &is_protected, + &is_pinned, NULL, NULL); if ( result < 0 ) { @@ -17341,14 +17341,14 @@ check_check_evictions_enabled_err(void) hbool_t rpt_fcn_called = FALSE; enum H5C_resize_status rpt_status; -static void test_rpt_fcn(UNUSED H5C_t * cache_ptr, - UNUSED int32_t version, - UNUSED double hit_rate, +static void test_rpt_fcn(H5_ATTR_UNUSED H5C_t * cache_ptr, + H5_ATTR_UNUSED int32_t version, + H5_ATTR_UNUSED double hit_rate, enum H5C_resize_status status, - UNUSED size_t old_max_cache_size, - UNUSED size_t new_max_cache_size, - UNUSED size_t old_min_clean_size, - UNUSED size_t new_min_clean_size) + H5_ATTR_UNUSED size_t old_max_cache_size, + H5_ATTR_UNUSED size_t new_max_cache_size, + H5_ATTR_UNUSED size_t old_min_clean_size, + H5_ATTR_UNUSED size_t new_min_clean_size) { rpt_fcn_called = TRUE; rpt_status = status; diff --git a/test/cache_common.c b/test/cache_common.c index 7b1a158..12001b2 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -19,7 +19,6 @@ * This file contains common code for tests of the cache * implemented in H5C.c */ -#include "H5private.h" /* Put this first, so H5open() isn't invoked in public macros */ #include "h5test.h" #include "H5Cprivate.h" #include "H5Iprivate.h" @@ -365,7 +364,7 @@ const H5C_class_t types[NUMBER_OF_ENTRY_TYPES] = static herr_t clear(H5F_t * f, void * thing, hbool_t dest); static herr_t destroy(H5F_t * f, void * thing); static herr_t flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, - haddr_t addr, void *thing, unsigned UNUSED * flags_ptr); + haddr_t addr, void *thing, unsigned H5_ATTR_UNUSED * flags_ptr); static void * load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata); static herr_t size(H5F_t * f, void * thing, size_t * size_ptr); static herr_t notify(H5C_notify_action_t action, void *thing); @@ -478,8 +477,8 @@ addr_to_type_and_index(haddr_t addr, */ herr_t -check_write_permitted(const H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, +check_write_permitted(const H5F_t H5_ATTR_UNUSED *f, + hid_t H5_ATTR_UNUSED dxpl_id, hbool_t *write_permitted_ptr) { @@ -638,7 +637,7 @@ notify_clear(H5F_t * f, void * thing, hbool_t dest) */ herr_t -destroy(H5F_t UNUSED * f, +destroy(H5F_t H5_ATTR_UNUSED * f, void * thing) { int i; @@ -799,14 +798,13 @@ notify_dest(H5F_t * f, void * thing) * *------------------------------------------------------------------------- */ - herr_t flush(H5F_t *f, - hid_t UNUSED dxpl_id, + hid_t H5_ATTR_UNUSED dxpl_id, hbool_t dest, haddr_t #ifdef NDEBUG - UNUSED + H5_ATTR_UNUSED #endif /* NDEBUG */ addr, void *thing, @@ -871,7 +869,6 @@ flush(H5F_t *f, } return(SUCCEED); - } /* flush() */ herr_t @@ -962,7 +959,6 @@ notify_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, return(flush(f, dxpl_id, dest, addr, thing, flags_ptr)); } - /*------------------------------------------------------------------------- * Function: load & friends @@ -980,10 +976,10 @@ notify_flush(H5F_t *f, hid_t dxpl_id, hbool_t dest, haddr_t addr, */ void * -load(H5F_t UNUSED *f, - hid_t UNUSED dxpl_id, +load(H5F_t H5_ATTR_UNUSED *f, + hid_t H5_ATTR_UNUSED dxpl_id, haddr_t addr, - void UNUSED *udata) + void H5_ATTR_UNUSED *udata) { int32_t type; int32_t idx; @@ -1108,9 +1104,8 @@ notify_load(H5F_t *f, hid_t dxpl_id, haddr_t addr, void *udata) * *------------------------------------------------------------------------- */ - herr_t -size(H5F_t UNUSED * f, +size(H5F_t H5_ATTR_UNUSED * f, void * thing, size_t * size_ptr) { @@ -1134,7 +1129,6 @@ size(H5F_t UNUSED * f, *size_ptr = entry_ptr->size; return(SUCCEED); - } /* size() */ herr_t diff --git a/test/dsets.c b/test/dsets.c index e9dd2ce..8055d27 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -1224,7 +1224,7 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{ *------------------------------------------------------------------------- */ static htri_t -can_apply_bogus(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id) +can_apply_bogus(hid_t H5_ATTR_UNUSED dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id) { if(H5Tequal(type_id,H5T_NATIVE_DOUBLE)) return 0; @@ -1250,9 +1250,9 @@ can_apply_bogus(hid_t UNUSED dcpl_id, hid_t type_id, hid_t UNUSED space_id) *------------------------------------------------------------------------- */ static size_t -filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, - size_t UNUSED *buf_size, void UNUSED **buf) +filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) { return nbytes; } @@ -1274,7 +1274,7 @@ filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, *------------------------------------------------------------------------- */ static herr_t -set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t UNUSED space_id) +set_local_bogus2(hid_t dcpl_id, hid_t type_id, hid_t H5_ATTR_UNUSED space_id) { unsigned add_on=0; /* Value to add to data going through */ unsigned flags; /* Filter flags */ @@ -1381,9 +1381,9 @@ filter_bogus2(unsigned int flags, size_t cd_nelmts, *------------------------------------------------------------------------- */ static size_t -filter_bogus3(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t UNUSED nbytes, - size_t UNUSED *buf_size, void UNUSED **buf) +filter_bogus3(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t H5_ATTR_UNUSED nbytes, + size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) { return 0; } @@ -1477,8 +1477,8 @@ error: *------------------------------------------------------------------------- */ static H5Z_cb_return_t -filter_cb_cont(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size, - void UNUSED *op_data) +filter_cb_cont(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNUSED buf_size, + void H5_ATTR_UNUSED *op_data) { if(H5Z_FILTER_FLETCHER32==filter) return H5Z_CB_CONT; @@ -1500,8 +1500,8 @@ filter_cb_cont(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size, *------------------------------------------------------------------------- */ static H5Z_cb_return_t -filter_cb_fail(H5Z_filter_t filter, void UNUSED *buf, size_t UNUSED buf_size, - void UNUSED *op_data) +filter_cb_fail(H5Z_filter_t filter, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNUSED buf_size, + void H5_ATTR_UNUSED *op_data) { if(H5Z_FILTER_FLETCHER32==filter) return H5Z_CB_FAIL; @@ -2069,7 +2069,7 @@ error: static herr_t test_filters(hid_t file, hid_t #ifndef H5_HAVE_FILTER_SZIP -UNUSED +H5_ATTR_UNUSED #endif /* H5_HAVE_FILTER_SZIP */ fapl) { @@ -5400,7 +5400,7 @@ error: static herr_t test_can_apply_szip(hid_t #ifndef H5_HAVE_FILTER_SZIP -UNUSED +H5_ATTR_UNUSED #endif /* H5_HAVE_FILTER_SZIP */ file) { @@ -6760,13 +6760,13 @@ error: #ifndef H5_NO_DEPRECATED_SYMBOLS /* Empty can_apply and set_local callbacks */ static htri_t -can_apply_deprec(hid_t UNUSED dcpl_id, hid_t UNUSED type_id, hid_t UNUSED space_id) +can_apply_deprec(hid_t H5_ATTR_UNUSED dcpl_id, hid_t H5_ATTR_UNUSED type_id, hid_t H5_ATTR_UNUSED space_id) { return 1; } static herr_t -set_local_deprec(hid_t UNUSED dcpl_id, hid_t UNUSED type_id, hid_t UNUSED space_id) +set_local_deprec(hid_t H5_ATTR_UNUSED dcpl_id, hid_t H5_ATTR_UNUSED type_id, hid_t H5_ATTR_UNUSED space_id) { return(SUCCEED); } @@ -7489,9 +7489,9 @@ static size_t filter_expand_factor_g = 0; *------------------------------------------------------------------------- */ static size_t -filter_expand(unsigned int flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, - size_t *buf_size, void UNUSED **buf) +filter_expand(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t *buf_size, void H5_ATTR_UNUSED **buf) { size_t ret_value = 0; @@ -8890,8 +8890,8 @@ error: *------------------------------------------------------------------------- */ static herr_t -gather_error_cb_fail(const void UNUSED *dst_buf, - size_t UNUSED dst_buf_bytes_used, void UNUSED *op_data) +gather_error_cb_fail(const void H5_ATTR_UNUSED *dst_buf, + size_t H5_ATTR_UNUSED dst_buf_bytes_used, void H5_ATTR_UNUSED *op_data) { return FAIL; } diff --git a/test/dt_arith.c b/test/dt_arith.c index c5b72d4..8ededc7 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -415,7 +415,7 @@ static int my_isinf(int endian, unsigned char *val, size_t size, *------------------------------------------------------------------------- */ static void -fpe_handler(int UNUSED signo) +fpe_handler(int H5_ATTR_UNUSED signo) { SKIPPED(); HDputs(" Test skipped due to SIGFPE."); @@ -488,7 +488,7 @@ reset_hdf5(void) *------------------------------------------------------------------------- */ static H5T_conv_ret_t -except_func(H5T_conv_except_t except_type, hid_t UNUSED src_id, hid_t UNUSED dst_id, void UNUSED *src_buf, +except_func(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5_ATTR_UNUSED dst_id, void H5_ATTR_UNUSED *src_buf, void *dst_buf, void *user_data) { H5T_conv_ret_t ret = H5T_CONV_HANDLED; @@ -677,7 +677,7 @@ test_hard_query(void) *------------------------------------------------------------------------- */ static H5T_conv_ret_t -expt_handle(H5T_conv_except_t except_type, hid_t UNUSED src_id, hid_t UNUSED dst_id, void UNUSED *src_buf, +expt_handle(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5_ATTR_UNUSED dst_id, void H5_ATTR_UNUSED *src_buf, void *dst_buf, void *user_data) { signed char fill_value1 = 7; diff --git a/test/dtypes.c b/test/dtypes.c index b2783c3..59cf000 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -4814,10 +4814,10 @@ test_bitfield_funcs(void) *------------------------------------------------------------------------- */ static herr_t -convert_opaque(hid_t UNUSED st, hid_t UNUSED dt, H5T_cdata_t *cdata, - size_t UNUSED nelmts, size_t UNUSED buf_stride, - size_t UNUSED bkg_stride, void UNUSED *_buf, - void UNUSED *bkg, hid_t UNUSED dset_xfer_plid) +convert_opaque(hid_t H5_ATTR_UNUSED st, hid_t H5_ATTR_UNUSED dt, H5T_cdata_t *cdata, + size_t H5_ATTR_UNUSED nelmts, size_t H5_ATTR_UNUSED buf_stride, + size_t H5_ATTR_UNUSED bkg_stride, void H5_ATTR_UNUSED *_buf, + void H5_ATTR_UNUSED *bkg, hid_t H5_ATTR_UNUSED dset_xfer_plid) { if (H5T_CONV_CONV==cdata->command) num_opaque_conversions_g++; return 0; @@ -5872,8 +5872,8 @@ typedef struct { } except_info_t; static H5T_conv_ret_t -conv_except(H5T_conv_except_t except_type, hid_t UNUSED src_id, hid_t UNUSED dst_id, - void UNUSED *src_buf, void UNUSED *dst_buf, void *_user_data) +conv_except(H5T_conv_except_t except_type, hid_t H5_ATTR_UNUSED src_id, hid_t H5_ATTR_UNUSED dst_id, + void H5_ATTR_UNUSED *src_buf, void H5_ATTR_UNUSED *dst_buf, void *_user_data) { except_info_t *user_data = (except_info_t *)_user_data; diff --git a/test/earray.c b/test/earray.c index 2135281..8a355c8 100644 --- a/test/earray.c +++ b/test/earray.c @@ -624,7 +624,7 @@ error: *------------------------------------------------------------------------- */ static earray_test_t * -earray_cache_test_load(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t UNUSED addr, const void UNUSED *udata1, void UNUSED *udata2) +earray_cache_test_load(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, haddr_t H5_ATTR_UNUSED addr, const void H5_ATTR_UNUSED *udata1, void H5_ATTR_UNUSED *udata2) { /* Check arguments */ HDassert(f); @@ -651,7 +651,7 @@ earray_cache_test_load(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, haddr_t UNUSED add *------------------------------------------------------------------------- */ static herr_t -earray_cache_test_flush(H5F_t UNUSED *f, hid_t UNUSED dxpl_id, hbool_t destroy, haddr_t UNUSED addr, earray_test_t *test, unsigned UNUSED * flags_ptr) +earray_cache_test_flush(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, hbool_t destroy, haddr_t H5_ATTR_UNUSED addr, earray_test_t *test, unsigned H5_ATTR_UNUSED * flags_ptr) { /* check arguments */ HDassert(f); @@ -722,7 +722,7 @@ error: *------------------------------------------------------------------------- */ herr_t -earray_cache_test_dest(H5F_t UNUSED *f, earray_test_t *test) +earray_cache_test_dest(H5F_t H5_ATTR_UNUSED *f, earray_test_t *test) { /* * Check arguments. @@ -787,7 +787,7 @@ error: *------------------------------------------------------------------------- */ static herr_t -earray_cache_test_size(const H5F_t UNUSED *f, const earray_test_t UNUSED *test, size_t *size_ptr) +earray_cache_test_size(const H5F_t H5_ATTR_UNUSED *f, const earray_test_t H5_ATTR_UNUSED *test, size_t *size_ptr) { /* check arguments */ HDassert(f); @@ -816,7 +816,7 @@ earray_cache_test_size(const H5F_t UNUSED *f, const earray_test_t UNUSED *test, *------------------------------------------------------------------------- */ static unsigned -test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tparam) +test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ @@ -1394,7 +1394,7 @@ test_flush_depend_cb(const void *_elmt, size_t nelmts, void *udata) *------------------------------------------------------------------------- */ static unsigned -test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t UNUSED *tparam) +test_flush_depend(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ @@ -1629,8 +1629,8 @@ typedef struct eiter_fw_t { *------------------------------------------------------------------------- */ static void * -eiter_fw_init(const H5EA_create_t UNUSED *cparam, const earray_test_param_t UNUSED *tparam, - hsize_t UNUSED cnt) +eiter_fw_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_param_t H5_ATTR_UNUSED *tparam, + hsize_t H5_ATTR_UNUSED cnt) { eiter_fw_t *eiter; /* Forward element iteration object */ @@ -2074,7 +2074,7 @@ typedef struct eiter_rnd_t { *------------------------------------------------------------------------- */ static void * -eiter_rnd_init(const H5EA_create_t UNUSED *cparam, const earray_test_param_t UNUSED *tparam, +eiter_rnd_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_param_t H5_ATTR_UNUSED *tparam, hsize_t cnt) { eiter_rnd_t *eiter; /* Random element iteration object */ @@ -2227,7 +2227,7 @@ static const earray_iter_t ea_iter_rnd = { *------------------------------------------------------------------------- */ static void * -eiter_rnd2_init(const H5EA_create_t UNUSED *cparam, const earray_test_param_t UNUSED *tparam, +eiter_rnd2_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_param_t H5_ATTR_UNUSED *tparam, hsize_t cnt) { eiter_rnd_t *eiter; /* Random element iteration object */ @@ -2311,7 +2311,7 @@ typedef struct eiter_cyc_t { *------------------------------------------------------------------------- */ static void * -eiter_cyc_init(const H5EA_create_t UNUSED *cparam, const earray_test_param_t UNUSED *tparam, +eiter_cyc_init(const H5EA_create_t H5_ATTR_UNUSED *cparam, const earray_test_param_t H5_ATTR_UNUSED *tparam, hsize_t cnt) { eiter_cyc_t *eiter; /* Cyclic element iteration object */ diff --git a/test/error_test.c b/test/error_test.c index 0d945d2..e712d86 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -314,7 +314,7 @@ error: *------------------------------------------------------------------------- */ static herr_t -long_desc_cb(unsigned UNUSED n, const H5E_error2_t *err_desc, void *client_data) +long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *client_data) { char *real_desc = (char *)client_data; diff --git a/test/farray.c b/test/farray.c index 7a79aaa..4c18916 100644 --- a/test/farray.c +++ b/test/farray.c @@ -440,7 +440,7 @@ error: *------------------------------------------------------------------------- */ static unsigned -test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t UNUSED *tparam) +test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ H5F_t *f = NULL; /* Internal file object pointer */ @@ -852,8 +852,8 @@ typedef struct fiter_fw_t { *------------------------------------------------------------------------- */ static void * -fiter_fw_init(const H5FA_create_t UNUSED *cparam, const farray_test_param_t UNUSED *tparam, - hsize_t UNUSED cnt) +fiter_fw_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_param_t H5_ATTR_UNUSED *tparam, + hsize_t H5_ATTR_UNUSED cnt) { fiter_fw_t *fiter; /* Forward element iteration object */ @@ -941,8 +941,8 @@ typedef struct fiter_rv_t { *------------------------------------------------------------------------- */ static void * -fiter_rv_init(const H5FA_create_t *cparam, const farray_test_param_t UNUSED *tparam, - hsize_t UNUSED cnt) +fiter_rv_init(const H5FA_create_t *cparam, const farray_test_param_t H5_ATTR_UNUSED *tparam, + hsize_t H5_ATTR_UNUSED cnt) { fiter_rv_t *fiter; /* Reverse element iteration object */ @@ -1008,7 +1008,7 @@ typedef struct fiter_rnd_t { *------------------------------------------------------------------------- */ static void * -fiter_rnd_init(const H5FA_create_t UNUSED *cparam, const farray_test_param_t UNUSED *tparam, +fiter_rnd_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_param_t H5_ATTR_UNUSED *tparam, hsize_t cnt) { fiter_rnd_t *fiter; /* Random element iteration object */ @@ -1126,7 +1126,7 @@ typedef struct fiter_cyc_t { *------------------------------------------------------------------------- */ static void * -fiter_cyc_init(const H5FA_create_t UNUSED *cparam, const farray_test_param_t UNUSED *tparam, +fiter_cyc_init(const H5FA_create_t H5_ATTR_UNUSED *cparam, const farray_test_param_t H5_ATTR_UNUSED *tparam, hsize_t cnt) { fiter_cyc_t *fiter; /* Cyclic element iteration object */ diff --git a/test/fheap.c b/test/fheap.c index 6bcd8bf..fee6fdf 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -1827,7 +1827,7 @@ error: *------------------------------------------------------------------------- */ static unsigned -test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam) +test_create(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ @@ -1944,7 +1944,7 @@ error: *------------------------------------------------------------------------- */ static unsigned -test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam) +test_reopen(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ @@ -2090,7 +2090,7 @@ error: *------------------------------------------------------------------------- */ static unsigned -test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam) +test_open_twice(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ hid_t file2 = -1; /* File ID */ @@ -2262,7 +2262,7 @@ error: *------------------------------------------------------------------------- */ static unsigned -test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t UNUSED *tparam) +test_delete_open(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t H5_ATTR_UNUSED *tparam) { hid_t file = -1; /* File ID */ char filename[FHEAP_FILENAME_LEN]; /* Filename to use */ @@ -15884,9 +15884,9 @@ error: /* Custom filter used to verify that the filters are actually called and do not * just silently fail */ static hbool_t test_write_filter_called; -static size_t test_write_filter(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED cd_values[], size_t nbytes, size_t UNUSED *buf_size, - void UNUSED **buf) +static size_t test_write_filter(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED cd_values[], size_t nbytes, size_t H5_ATTR_UNUSED *buf_size, + void H5_ATTR_UNUSED **buf) { test_write_filter_called = TRUE; diff --git a/test/fillval.c b/test/fillval.c index e7ad521..c791504 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1301,7 +1301,7 @@ error: *------------------------------------------------------------------------- */ static int -test_extend_release_integer(void UNUSED *_elmt) +test_extend_release_integer(void H5_ATTR_UNUSED *_elmt) { return 0; } /* end test_extend_release_integer() */ diff --git a/test/filter_fail.c b/test/filter_fail.c index 3dbb564..0b92abb 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -65,8 +65,8 @@ const H5Z_class2_t H5Z_FAIL_TEST[1] = {{ *------------------------------------------------------------------------- */ static size_t -filter_fail(unsigned int flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, +filter_fail(unsigned int flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, size_t *buf_size, void **buf) { int *dst = (int*)(*buf); diff --git a/test/freespace.c b/test/freespace.c index 9ab0d75..1338ae7 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -85,8 +85,8 @@ typedef struct TEST_free_section_t { static herr_t TEST_sect_init_cls(H5FS_section_class_t *, void *); static herr_t TEST_sect_free(H5FS_section_info_t *_sect); -static herr_t TEST_sect_can_merge(const H5FS_section_info_t *, const H5FS_section_info_t *, void UNUSED *); -static herr_t TEST_sect_merging(H5FS_section_info_t *, H5FS_section_info_t *, void UNUSED *); +static herr_t TEST_sect_can_merge(const H5FS_section_info_t *, const H5FS_section_info_t *, void H5_ATTR_UNUSED *); +static herr_t TEST_sect_merging(H5FS_section_info_t *, H5FS_section_info_t *, void H5_ATTR_UNUSED *); static herr_t TEST_sect_can_shrink(const H5FS_section_info_t *, void *); static herr_t TEST_sect_shrinking(H5FS_section_info_t **, void *); @@ -223,7 +223,7 @@ TEST_sect_init_cls(H5FS_section_class_t *cls, void *_udata) */ static herr_t TEST_sect_can_merge(const H5FS_section_info_t *_sect1, - const H5FS_section_info_t *_sect2, void UNUSED *_udata) + const H5FS_section_info_t *_sect2, void H5_ATTR_UNUSED *_udata) { const TEST_free_section_t *sect1 = (const TEST_free_section_t *)_sect1; const TEST_free_section_t *sect2 = (const TEST_free_section_t *)_sect2; @@ -246,7 +246,7 @@ TEST_sect_can_merge(const H5FS_section_info_t *_sect1, */ static herr_t TEST_sect_merging(H5FS_section_info_t *_sect1, H5FS_section_info_t *_sect2, - void UNUSED *_udata) + void H5_ATTR_UNUSED *_udata) { TEST_free_section_t *sect1 = (TEST_free_section_t *)_sect1; TEST_free_section_t *sect2 = (TEST_free_section_t *)_sect2; diff --git a/test/gen_filters.c b/test/gen_filters.c index b44339d..f506602 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -123,9 +123,9 @@ const H5Z_class2_t H5Z_BOGUS[1] = {{ *------------------------------------------------------------------------- */ static size_t -filter_bogus(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, - size_t UNUSED *buf_size, void UNUSED **buf) +filter_bogus(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) { return nbytes; } diff --git a/test/h5test.c b/test/h5test.c index 848712c..dc13a27 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -113,7 +113,7 @@ static char * h5_fixname_real(const char *base_name, hid_t fapl, const char *suf *------------------------------------------------------------------------- */ static herr_t -h5_errors(hid_t estack, void UNUSED *client_data) +h5_errors(hid_t estack, void H5_ATTR_UNUSED *client_data) { H5_FAILED(); H5Eprint2(estack, stdout); @@ -725,21 +725,24 @@ h5_show_hostname(void) { char hostname[80]; #ifdef H5_HAVE_WIN32_API - WSADATA wsaData; - int err; + WSADATA wsaData; + int err; #endif /* try show the process or thread id in multiple processes cases*/ #ifdef H5_HAVE_PARALLEL { - int mpi_rank, mpi_initialized; - - MPI_Initialized(&mpi_initialized); - if (mpi_initialized){ - MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); - printf("MPI-process %d.", mpi_rank); - }else - printf("thread 0."); + int mpi_rank, mpi_initialized, mpi_finalized; + + MPI_Initialized(&mpi_initialized); + MPI_Finalized(&mpi_finalized); + + if(mpi_initialized && !mpi_finalized) { + MPI_Comm_rank(MPI_COMM_WORLD,&mpi_rank); + printf("MPI-process %d.", mpi_rank); + } + else + printf("thread 0."); } #elif defined(H5_HAVE_THREADSAFE) printf("thread %lu.", HDpthread_self_ulong()); @@ -748,31 +751,31 @@ h5_show_hostname(void) #endif #ifdef H5_HAVE_WIN32_API - err = WSAStartup( MAKEWORD(2,2), &wsaData ); - if ( err != 0 ) { - /* could not find a usable WinSock DLL */ - return; - } - -/* Confirm that the WinSock DLL supports 2.2.*/ -/* Note that if the DLL supports versions greater */ -/* than 2.2 in addition to 2.2, it will still return */ -/* 2.2 in wVersion since that is the version we */ -/* requested. */ + err = WSAStartup( MAKEWORD(2,2), &wsaData ); + if ( err != 0 ) { + /* could not find a usable WinSock DLL */ + return; + } - if ( LOBYTE( wsaData.wVersion ) != 2 || - HIBYTE( wsaData.wVersion ) != 2 ) { - /* could not find a usable WinSock DLL */ - WSACleanup( ); - return; - } + /* Confirm that the WinSock DLL supports 2.2.*/ + /* Note that if the DLL supports versions greater */ + /* than 2.2 in addition to 2.2, it will still return */ + /* 2.2 in wVersion since that is the version we */ + /* requested. */ + + if ( LOBYTE( wsaData.wVersion ) != 2 || + HIBYTE( wsaData.wVersion ) != 2 ) { + /* could not find a usable WinSock DLL */ + WSACleanup( ); + return; + } #endif #ifdef H5_HAVE_GETHOSTNAME if (gethostname(hostname, (size_t)80) < 0) - printf(" gethostname failed\n"); + printf(" gethostname failed\n"); else - printf(" hostname=%s\n", hostname); + printf(" hostname=%s\n", hostname); #else printf(" gethostname not supported\n"); #endif @@ -1124,61 +1127,62 @@ int h5_szip_can_encode(void ) char * getenv_all(MPI_Comm comm, int root, const char* name) { - int mpi_size, mpi_rank, mpi_initialized; + int mpi_size, mpi_rank, mpi_initialized, mpi_finalized; int len; static char* env = NULL; assert(name); MPI_Initialized(&mpi_initialized); - if(!mpi_initialized) { - /* use original getenv */ - if(env) - HDfree(env); - env = HDgetenv(name); - } /* end if */ - else { - MPI_Comm_rank(comm, &mpi_rank); - MPI_Comm_size(comm, &mpi_size); - assert(root < mpi_size); - - /* The root task does the getenv call - * and sends the result to the other tasks */ - if(mpi_rank == root) { - env = HDgetenv(name); - if(env) { - len = (int)HDstrlen(env); - MPI_Bcast(&len, 1, MPI_INT, root, comm); - MPI_Bcast(env, len, MPI_CHAR, root, comm); - } - else { - /* len -1 indicates that the variable was not in the environment */ - len = -1; - MPI_Bcast(&len, 1, MPI_INT, root, comm); - } - } - else { - MPI_Bcast(&len, 1, MPI_INT, root, comm); - if(len >= 0) { - if(env == NULL) - env = (char*) HDmalloc((size_t)len+1); - else if(HDstrlen(env) < (size_t)len) - env = (char*) HDrealloc(env, (size_t)len+1); - - MPI_Bcast(env, len, MPI_CHAR, root, comm); - env[len] = '\0'; - } - else { - if(env) - HDfree(env); - env = NULL; - } - } - } - + MPI_Finalized(&mpi_finalized); + + if(mpi_initialized && !mpi_finalized) { + MPI_Comm_rank(comm, &mpi_rank); + MPI_Comm_size(comm, &mpi_size); + assert(root < mpi_size); + + /* The root task does the getenv call + * and sends the result to the other tasks */ + if(mpi_rank == root) { + env = HDgetenv(name); + if(env) { + len = (int)HDstrlen(env); + MPI_Bcast(&len, 1, MPI_INT, root, comm); + MPI_Bcast(env, len, MPI_CHAR, root, comm); + } + else { + /* len -1 indicates that the variable was not in the environment */ + len = -1; + MPI_Bcast(&len, 1, MPI_INT, root, comm); + } + } + else { + MPI_Bcast(&len, 1, MPI_INT, root, comm); + if(len >= 0) { + if(env == NULL) + env = (char*) HDmalloc((size_t)len+1); + else if(HDstrlen(env) < (size_t)len) + env = (char*) HDrealloc(env, (size_t)len+1); + + MPI_Bcast(env, len, MPI_CHAR, root, comm); + env[len] = '\0'; + } + else { + if(env) + HDfree(env); + env = NULL; + } + } #ifndef NDEBUG - MPI_Barrier(comm); + MPI_Barrier(comm); #endif + } + else { + /* use original getenv */ + if(env) + HDfree(env); + env = HDgetenv(name); + } /* end if */ return env; } @@ -1247,8 +1251,8 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name) *------------------------------------------------------------------------- */ static herr_t -h5_verify_cached_stabs_cb(hid_t oid, const char UNUSED *name, - const H5O_info_t *oinfo, void UNUSED *udata) +h5_verify_cached_stabs_cb(hid_t oid, const char H5_ATTR_UNUSED *name, + const H5O_info_t *oinfo, void H5_ATTR_UNUSED *udata) { if(oinfo->type == H5O_TYPE_GROUP) return(H5G__verify_cached_stabs_test(oid)); diff --git a/test/links.c b/test/links.c index 0846c49..cfbc4a1 100644 --- a/test/links.c +++ b/test/links.c @@ -7320,8 +7320,8 @@ error: /* Callback functions for UD hard links. */ /* UD_hard_create increments the object's reference count */ static herr_t -UD_hard_create(const char UNUSED * link_name, hid_t loc_group, const void *udata, - size_t udata_size, hid_t UNUSED lcpl_id) +UD_hard_create(const char H5_ATTR_UNUSED * link_name, hid_t loc_group, const void *udata, + size_t udata_size, hid_t H5_ATTR_UNUSED lcpl_id) { haddr_t addr; hid_t target_obj = -1; @@ -7389,8 +7389,8 @@ done: /* Traverse a hard link by opening the object */ static hid_t -UD_hard_traverse(const char UNUSED *link_name, hid_t cur_group, - const void *udata, size_t udata_size, hid_t UNUSED lapl_id) +UD_hard_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, + const void *udata, size_t udata_size, hid_t H5_ATTR_UNUSED lapl_id) { haddr_t addr; hid_t ret_value = -1; @@ -7407,7 +7407,7 @@ UD_hard_traverse(const char UNUSED *link_name, hid_t cur_group, /* UD_hard_delete decrements the object's reference count */ static herr_t -UD_hard_delete(const char UNUSED * link_name, hid_t file, const void *udata, +UD_hard_delete(const char H5_ATTR_UNUSED * link_name, hid_t file, const void *udata, size_t udata_size) { haddr_t addr; @@ -7625,8 +7625,8 @@ ud_hard_links(hid_t fapl) * in the current group named REREG_TARGET_NAME */ static hid_t -UD_rereg_traverse(const char UNUSED * link_name, hid_t cur_group, - const void UNUSED *udata, size_t UNUSED udata_size, hid_t lapl_id) +UD_rereg_traverse(const char H5_ATTR_UNUSED * link_name, hid_t cur_group, + const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id) { hid_t ret_value; @@ -8064,8 +8064,8 @@ error: *------------------------------------------------------------------------- */ static hid_t -UD_plist_traverse(const char UNUSED * link_name, hid_t cur_group, - const void UNUSED *udata, size_t udata_size, hid_t lapl_id) +UD_plist_traverse(const char H5_ATTR_UNUSED * link_name, hid_t cur_group, + const void H5_ATTR_UNUSED *udata, size_t udata_size, hid_t lapl_id) { char target[NAME_BUF_SIZE]; hid_t ret_value; @@ -8203,8 +8203,8 @@ lapl_udata(hid_t fapl, hbool_t new_format) *------------------------------------------------------------------------- */ static herr_t -UD_cbsucc_create(const char UNUSED * link_name, hid_t UNUSED loc_group, - const void *udata, size_t udata_size, hid_t UNUSED lcpl_id) +UD_cbsucc_create(const char H5_ATTR_UNUSED * link_name, hid_t H5_ATTR_UNUSED loc_group, + const void *udata, size_t udata_size, hid_t H5_ATTR_UNUSED lcpl_id) { /* Check to make sure that this "soft link" has a target */ if(udata_size < 1 || !udata) @@ -8214,8 +8214,8 @@ UD_cbsucc_create(const char UNUSED * link_name, hid_t UNUSED loc_group, } /* end UD_cbsucc_create() */ static hid_t -UD_cbsucc_traverse(const char UNUSED *link_name, hid_t cur_group, - const void *udata, size_t UNUSED udata_size, hid_t lapl_id) +UD_cbsucc_traverse(const char H5_ATTR_UNUSED *link_name, hid_t cur_group, + const void *udata, size_t H5_ATTR_UNUSED udata_size, hid_t lapl_id) { const char *target = (const char *)udata; hid_t ret_value; @@ -8232,8 +8232,8 @@ error: /* Failure callback for when the link is moved or renamed */ static herr_t -UD_cbfail_move(const char UNUSED *new_name, hid_t UNUSED new_loc, - const void UNUSED *udata, size_t UNUSED udata_size) +UD_cbfail_move(const char H5_ATTR_UNUSED *new_name, hid_t H5_ATTR_UNUSED new_loc, + const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size) { /* This traversal function will always fail. */ return -1; @@ -8241,8 +8241,8 @@ UD_cbfail_move(const char UNUSED *new_name, hid_t UNUSED new_loc, /* SuccessCallback for when the link is moved or renamed */ static herr_t -UD_cbsucc_move(const char UNUSED *new_name, hid_t UNUSED new_loc, - const void UNUSED *udata, size_t UNUSED udata_size) +UD_cbsucc_move(const char H5_ATTR_UNUSED *new_name, hid_t H5_ATTR_UNUSED new_loc, + const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size) { /* This traversal function will always succeed. */ return 0; @@ -8250,8 +8250,8 @@ UD_cbsucc_move(const char UNUSED *new_name, hid_t UNUSED new_loc, /* Callback for when the link is deleted. Also called during move */ static herr_t -UD_cbsucc_delete(const char UNUSED *link_name, hid_t UNUSED file, - const void UNUSED *udata, size_t UNUSED udata_size) +UD_cbsucc_delete(const char H5_ATTR_UNUSED *link_name, hid_t H5_ATTR_UNUSED file, + const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size) { /* This callback will always succeed */ return 0; @@ -8259,8 +8259,8 @@ UD_cbsucc_delete(const char UNUSED *link_name, hid_t UNUSED file, /* Callback for when the link is deleted. Also called during move */ static herr_t -UD_cbfail_delete(const char UNUSED *link_name, hid_t UNUSED file, - const void UNUSED *udata, size_t UNUSED udata_size) +UD_cbfail_delete(const char H5_ATTR_UNUSED *link_name, hid_t H5_ATTR_UNUSED file, + const void H5_ATTR_UNUSED *udata, size_t H5_ATTR_UNUSED udata_size) { /* This traversal function will always fail. */ /* Note: un-deletable links are in general a very bad idea! */ @@ -8269,8 +8269,8 @@ UD_cbfail_delete(const char UNUSED *link_name, hid_t UNUSED file, /* Callback for when the link is queried */ static ssize_t -UD_cbfail_query(const char UNUSED *link_name, const void UNUSED *udata, - size_t UNUSED udata_size, void UNUSED *buf, size_t UNUSED buf_size) +UD_cbfail_query(const char H5_ATTR_UNUSED *link_name, const void H5_ATTR_UNUSED *udata, + size_t H5_ATTR_UNUSED udata_size, void H5_ATTR_UNUSED *buf, size_t H5_ATTR_UNUSED buf_size) { /* This traversal function will always fail. */ return -1; @@ -8278,8 +8278,8 @@ UD_cbfail_query(const char UNUSED *link_name, const void UNUSED *udata, /* Callback for when the link is queried */ static ssize_t -UD_cbfail_on_write_query(const char UNUSED *link_name, const void UNUSED *udata, - size_t UNUSED udata_size, void *buf, size_t UNUSED buf_size) +UD_cbfail_on_write_query(const char H5_ATTR_UNUSED *link_name, const void H5_ATTR_UNUSED *udata, + size_t H5_ATTR_UNUSED udata_size, void *buf, size_t H5_ATTR_UNUSED buf_size) { /* This traversal function will return a buffer size, * but will fail when a buffer is passed in ("writing to the buffer" @@ -8294,8 +8294,8 @@ UD_cbfail_on_write_query(const char UNUSED *link_name, const void UNUSED *udata, /* Callback for when the link is queried */ static ssize_t -UD_cbsucc_query(const char UNUSED *link_name, const void UNUSED *udata, - size_t UNUSED udata_size, void *buf, size_t buf_size) +UD_cbsucc_query(const char H5_ATTR_UNUSED *link_name, const void H5_ATTR_UNUSED *udata, + size_t H5_ATTR_UNUSED udata_size, void *buf, size_t buf_size) { /* This traversal function will return a buffer size, * but will fail when a buffer is passed in ("writing to the buffer" @@ -9007,7 +9007,7 @@ error: *------------------------------------------------------------------------- */ static int -visit_link_cb(hid_t UNUSED group_id, const char *name, const H5L_info_t *linfo, +visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info_t *linfo, void *_op_data) { lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data; @@ -9185,7 +9185,7 @@ error: *------------------------------------------------------------------------- */ static int -visit_obj_cb(hid_t UNUSED group_id, const char *name, const H5O_info_t *oinfo, +visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info_t *oinfo, void *_op_data) { ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data; @@ -9363,7 +9363,7 @@ error: *------------------------------------------------------------------------- */ static int -visit_obj_stop_cb(hid_t UNUSED group_id, const char UNUSED *name, const H5O_info_t UNUSED *oinfo, +visit_obj_stop_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *name, const H5O_info_t H5_ATTR_UNUSED *oinfo, void *_op_data) { unsigned *op_data = (unsigned *)_op_data; @@ -9489,8 +9489,8 @@ static herr_t link_filter_set_local(hid_t dcpl_id, hid_t type_id, hid_t space_id } /* end link_filter_set_local */ static size_t link_filter_filter(unsigned int flags, size_t cd_nelmts, - const unsigned int cd_values[], size_t nbytes, size_t UNUSED *buf_size, - void UNUSED **buf) + const unsigned int cd_values[], size_t nbytes, size_t H5_ATTR_UNUSED *buf_size, + void H5_ATTR_UNUSED **buf) { if(flags & H5Z_FLAG_OPTIONAL || cd_nelmts != 1 || cd_values[0] != 2112) return 0; @@ -11990,8 +11990,8 @@ group_iterate_cb(hid_t group_id, const char *link_name, void *_op_data) *------------------------------------------------------------------------- */ static int -link_iterate_fail_cb(hid_t UNUSED group_id, const char UNUSED *link_name, - const H5L_info_t UNUSED *info, void UNUSED *_op_data) +link_iterate_fail_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *link_name, + const H5L_info_t H5_ATTR_UNUSED *info, void H5_ATTR_UNUSED *_op_data) { return(H5_ITER_ERROR); } /* end link_iterate_fail_cb() */ diff --git a/test/objcopy.c b/test/objcopy.c index 71a7236..e84e70c 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -11449,7 +11449,7 @@ error: */ static herr_t test_copy_iterate_cb(hid_t loc_id, const char *name, - const H5L_info_t UNUSED *link_info, void *op_data) + const H5L_info_t H5_ATTR_UNUSED *link_info, void *op_data) { hid_t dst_loc_id = *((hid_t *)op_data); diff --git a/test/tattr.c b/test/tattr.c index 31a3844..9429f31 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -1392,7 +1392,7 @@ test_attr_mult_read(hid_t fapl) ** ****************************************************************/ static herr_t -attr_op1(hid_t UNUSED loc_id, const char *name, const H5A_info_t UNUSED *ainfo, +attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *op_data) { int *count = (int *)op_data; @@ -6508,8 +6508,8 @@ attr_iterate1_cb(hid_t loc_id, const char *attr_name, void *_op_data) *------------------------------------------------------------------------- */ static int -attr_iterate2_fail_cb(hid_t UNUSED group_id, const char UNUSED *attr_name, - const H5A_info_t UNUSED *info, void UNUSED *_op_data) +attr_iterate2_fail_cb(hid_t H5_ATTR_UNUSED group_id, const char H5_ATTR_UNUSED *attr_name, + const H5A_info_t H5_ATTR_UNUSED *info, void H5_ATTR_UNUSED *_op_data) { return(H5_ITER_ERROR); } /* end attr_iterate2_fail_cb() */ diff --git a/test/tcheck_version.c b/test/tcheck_version.c index 91d98ef..a75d642 100644 --- a/test/tcheck_version.c +++ b/test/tcheck_version.c @@ -36,7 +36,7 @@ /* prototypes */ void showhelp(void); void parse(int ac, char **av); -void abort_intercept (int UNUSED sig); +void abort_intercept (int H5_ATTR_UNUSED sig); /* global variables */ unsigned major = H5_VERS_MAJOR; @@ -105,7 +105,7 @@ parse(int ac, char **av) * This tries to eliminate those side effects. */ void -abort_intercept (int UNUSED sig) +abort_intercept (int H5_ATTR_UNUSED sig) { HDexit(6); } diff --git a/test/tgenprop.c b/test/tgenprop.c index a3f1752..bf4f3fa 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -385,7 +385,7 @@ test_genprop_cls_crt_cb1(hid_t list_id, void *create_data) } static herr_t -test_genprop_cls_cpy_cb1(hid_t new_list_id, hid_t UNUSED old_list_id, void *copy_data) +test_genprop_cls_cpy_cb1(hid_t new_list_id, hid_t H5_ATTR_UNUSED old_list_id, void *copy_data) { struct { /* Struct for iterations */ int count; @@ -993,7 +993,7 @@ prop_cb_info prop3_cb_info; /* Callback statistics for property #3 */ ** ****************************************************************/ static herr_t -test_genprop_cls_cpy_cb2(hid_t new_list_id, hid_t UNUSED old_list_id, void *create_data) +test_genprop_cls_cpy_cb2(hid_t new_list_id, hid_t H5_ATTR_UNUSED old_list_id, void *create_data) { struct { /* Struct for iterations */ int count; @@ -239,7 +239,7 @@ out: /* A dummy search function for the next test */ -static int test_search_func(void UNUSED * ptr1, void UNUSED * ptr2) { return 0; } +static int test_search_func(void H5_ATTR_UNUSED * ptr1, void H5_ATTR_UNUSED * ptr2) { return 0; } /* Ensure that public functions cannot access "predefined" ID types */ static int id_predefined_test(void ) diff --git a/test/titerate.c b/test/titerate.c index 049e258..fff13f1 100644 --- a/test/titerate.c +++ b/test/titerate.c @@ -83,7 +83,7 @@ int iter_strcmp(const void *s1, const void *s2) ** ****************************************************************/ static herr_t -liter_cb(hid_t UNUSED group, const char *name, const H5L_info_t UNUSED *link_info, +liter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_info, void *op_data) { iter_info *info = (iter_info *)op_data; @@ -344,7 +344,7 @@ test_iter_group(hid_t fapl, hbool_t new_format) ** ****************************************************************/ herr_t -aiter_cb(hid_t UNUSED group, const char *name, const H5A_info_t UNUSED *ainfo, +aiter_cb(hid_t H5_ATTR_UNUSED group, const char *name, const H5A_info_t H5_ATTR_UNUSED *ainfo, void *op_data) { iter_info *info = (iter_info *)op_data; @@ -538,7 +538,7 @@ int iter_strcmp2(const void *s1, const void *s2) ** ****************************************************************/ static herr_t -liter_cb2(hid_t loc_id, const char *name, const H5L_info_t UNUSED *link_info, +liter_cb2(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *link_info, void *opdata) { const iter_info *test_info = (const iter_info *)opdata; diff --git a/test/tmisc.c b/test/tmisc.c index 869557c..e9b5680 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -5137,8 +5137,8 @@ test_misc29(void) static int -test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t UNUSED *info, - void UNUSED *op_data) +test_misc30_get_info_cb(hid_t loc_id, const char *name, const H5L_info_t H5_ATTR_UNUSED *info, + void H5_ATTR_UNUSED *op_data) { H5O_info_t object_info; diff --git a/test/trefer.c b/test/trefer.c index 6d72aee..203b602 100644 --- a/test/trefer.c +++ b/test/trefer.c @@ -1232,7 +1232,7 @@ test_reference_obj_deleted(void) ** ****************************************************************/ static herr_t -test_deref_iter_op(hid_t UNUSED group, const char *name, const H5L_info_t UNUSED *info, +test_deref_iter_op(hid_t H5_ATTR_UNUSED group, const char *name, const H5L_info_t H5_ATTR_UNUSED *info, void *op_data) { int *count = (int *)op_data; /* Pointer to name counter */ diff --git a/test/tselect.c b/test/tselect.c index 5190223..24a9274 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -186,7 +186,7 @@ static herr_t test_select_hyper_iter3(void *elem,hid_t type_id, unsigned ndim, c ** ****************************************************************/ static herr_t -test_select_hyper_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void *_operator_data) +test_select_hyper_iter1(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, void *_operator_data) { uint8_t *tbuf=(uint8_t *)_elem, /* temporary buffer pointer */ **tbuf2=(uint8_t **)_operator_data; /* temporary buffer handle */ @@ -385,7 +385,7 @@ struct pnt_iter { ** ****************************************************************/ static herr_t -test_select_point_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void *_operator_data) +test_select_point_iter1(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, void *_operator_data) { uint8_t *elem=(uint8_t *)_elem; /* Pointer to the element to examine */ uint8_t *tmp; /* temporary ptr to element in operator data */ @@ -662,7 +662,7 @@ test_select_point(hid_t xfer_plist) ** ****************************************************************/ static herr_t -test_select_all_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void *_operator_data) +test_select_all_iter1(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, void *_operator_data) { uint8_t *tbuf=(uint8_t *)_elem, /* temporary buffer pointer */ **tbuf2=(uint8_t **)_operator_data; /* temporary buffer handle */ @@ -682,7 +682,7 @@ test_select_all_iter1(void *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, c ** ****************************************************************/ static herr_t -test_select_none_iter1(void UNUSED *_elem, hid_t UNUSED type_id, unsigned UNUSED ndim, const hsize_t UNUSED *point, void UNUSED *_operator_data) +test_select_none_iter1(void H5_ATTR_UNUSED *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, const hsize_t H5_ATTR_UNUSED *point, void H5_ATTR_UNUSED *_operator_data) { return(-1); } /* end test_select_none_iter1() */ @@ -5816,7 +5816,7 @@ test_select_hyper_nota_2d(void) ** ****************************************************************/ static herr_t -test_select_hyper_iter2(void *_elem, hid_t UNUSED type_id, unsigned ndim, const hsize_t *point, void *_operator_data) +test_select_hyper_iter2(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned ndim, const hsize_t *point, void *_operator_data) { int *tbuf=(int *)_elem, /* temporary buffer pointer */ **tbuf2=(int **)_operator_data; /* temporary buffer handle */ @@ -7008,7 +7008,7 @@ typedef struct { ** ****************************************************************/ static herr_t -test_select_hyper_iter3(void *_elem, hid_t UNUSED type_id, unsigned ndim, const hsize_t *point, void *_operator_data) +test_select_hyper_iter3(void *_elem, hid_t H5_ATTR_UNUSED type_id, unsigned ndim, const hsize_t *point, void *_operator_data) { unsigned *tbuf = (unsigned *)_elem; /* temporary buffer pointer */ fill_iter_info *iter_info = (fill_iter_info *)_operator_data; /* Get the pointer to the iterator information */ diff --git a/test/tskiplist.c b/test/tskiplist.c index 8966e39..07e63fd 100644 --- a/test/tskiplist.c +++ b/test/tskiplist.c @@ -592,7 +592,7 @@ test_skiplist_string(void) } /* end test_skiplist_string() */ static herr_t -test_skiplist_iter(void *item, void UNUSED *key, void *op_data) +test_skiplist_iter(void *item, void H5_ATTR_UNUSED *key, void *op_data) { size_t *up=(size_t *)op_data; @@ -1070,7 +1070,7 @@ test_skiplist_add(void) } /* end test_skiplist_add() */ static herr_t -test_skiplist_destroy_free(void *item, void UNUSED *key, void *op_data) +test_skiplist_destroy_free(void *item, void H5_ATTR_UNUSED *key, void *op_data) { unsigned *free_count=(unsigned *)op_data; diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index d8ed462..9bbec34 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -120,7 +120,7 @@ void tts_cancel(void) assert(ret==0); } -void *tts_cancel_thread(void UNUSED *arg) +void *tts_cancel_thread(void H5_ATTR_UNUSED *arg) { int datavalue; int buffer; @@ -182,8 +182,8 @@ void *tts_cancel_thread(void UNUSED *arg) return NULL; } -herr_t tts_cancel_callback(void *elem, hid_t UNUSED type_id, unsigned UNUSED ndim, - const hsize_t UNUSED *point, void *operator_data) +herr_t tts_cancel_callback(void *elem, hid_t H5_ATTR_UNUSED type_id, unsigned H5_ATTR_UNUSED ndim, + const hsize_t H5_ATTR_UNUSED *point, void *operator_data) { int value = *(int *)elem; hid_t dataset = *(hid_t *)operator_data; diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index b81a7ad..e143263 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -154,7 +154,7 @@ void tts_error(void) } static -void *tts_error_thread(void UNUSED *arg) +void *tts_error_thread(void H5_ATTR_UNUSED *arg) { hid_t dataspace, datatype, dataset; hsize_t dimsf[1]; /* dataset dimensions */ @@ -199,7 +199,7 @@ void *tts_error_thread(void UNUSED *arg) } static -herr_t error_callback(hid_t UNUSED estack_id, void *client_data) +herr_t error_callback(hid_t H5_ATTR_UNUSED estack_id, void *client_data) { H5TS_mutex_lock_simple(&error_mutex); error_count++; @@ -208,7 +208,7 @@ herr_t error_callback(hid_t UNUSED estack_id, void *client_data) } static -herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void UNUSED *client_data) +herr_t walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSED *client_data) { hid_t maj_num, min_num; diff --git a/test/tunicode.c b/test/tunicode.c index 82dc429..93c00c5 100644 --- a/test/tunicode.c +++ b/test/tunicode.c @@ -119,7 +119,7 @@ void test_fl_string(hid_t fid, const char *string) * Borrows heavily from dtypes.c, but is more complicated because * the string is randomly generated. */ -void test_strpad(hid_t UNUSED fid, const char *string) +void test_strpad(hid_t H5_ATTR_UNUSED fid, const char *string) { /* buf is used to hold the data that H5Tconvert operates on. */ char buf[LONG_BUF_SIZE]; @@ -650,7 +650,7 @@ void test_compound(hid_t fid, const char * string) * test_enum * Test that enumerated datatypes can have UTF-8 member names. */ -void test_enum(hid_t UNUSED fid, const char * string) +void test_enum(hid_t H5_ATTR_UNUSED fid, const char * string) { /* Define an enumerated type */ typedef enum { @@ -699,7 +699,7 @@ void test_enum(hid_t UNUSED fid, const char * string) * test_opaque * Test comments on opaque datatypes */ -void test_opaque(hid_t UNUSED fid, const char * string) +void test_opaque(hid_t H5_ATTR_UNUSED fid, const char * string) { hid_t type_id; char * read_buf; diff --git a/test/unregister.c b/test/unregister.c index 383958d..be40383 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -68,9 +68,9 @@ const H5Z_class2_t H5Z_DUMMY[1] = {{ *------------------------------------------------------------------------- */ static size_t -filter_dummy(unsigned int UNUSED flags, size_t UNUSED cd_nelmts, - const unsigned int UNUSED *cd_values, size_t nbytes, - size_t UNUSED *buf_size, void UNUSED **buf) +filter_dummy(unsigned int H5_ATTR_UNUSED flags, size_t H5_ATTR_UNUSED cd_nelmts, + const unsigned int H5_ATTR_UNUSED *cd_values, size_t nbytes, + size_t H5_ATTR_UNUSED *buf_size, void H5_ATTR_UNUSED **buf) { return nbytes; } |