From ee655cf374c5f2b2f43673a9e1d925af0f231626 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 9 Apr 2021 07:07:53 -0700 Subject: Brings a lot of smaller changes from develop --- src/H5ACmodule.h | 8 +- src/H5ACprivate.h | 38 +++--- src/H5Bpkg.h | 28 ++--- src/H5Cpkg.h | 30 ++--- src/H5Cprivate.h | 8 +- src/H5FDpublic.h | 6 +- test/bittests.c | 2 +- test/cache_api.c | 10 +- test/cache_common.h | 6 +- test/cache_logging.c | 2 +- test/chunk_info.c | 14 +-- test/cmpd_dset.c | 48 ++++---- test/cross_read.c | 2 +- test/dangle.c | 12 +- test/direct_chunk.c | 2 +- test/dt_arith.c | 77 ++++++------ test/dtransform.c | 8 +- test/enum.c | 6 +- test/error_test.c | 9 +- test/extend.c | 2 +- test/external.c | 22 ++-- test/external_common.c | 2 +- test/external_common.h | 8 +- test/external_env.c | 3 - test/external_fname.h | 8 +- test/filenotclosed.c | 4 +- test/fillval.c | 70 +++++------ test/filter_fail.c | 6 +- test/filter_plugin.c | 2 +- test/flush1.c | 2 +- test/flush2.c | 2 +- test/flushrefreshTest.cmake | 2 +- test/gen_bad_compound.c | 2 +- test/gen_bad_ohdr.c | 2 +- test/gen_cross.c | 4 +- test/gen_filters.c | 6 +- test/gen_mergemsg.c | 2 +- test/getname.c | 16 +-- test/hyperslab.c | 16 +-- test/istore.c | 10 +- test/links.c | 279 +++++++++++++++++++++++--------------------- test/swmr_common.h | 6 +- testpar/testphdf5.h | 5 +- tools/lib/h5diff.h | 6 +- tools/lib/h5tools.h | 8 +- tools/lib/h5tools_dump.h | 6 +- tools/lib/h5tools_error.h | 6 +- tools/lib/h5tools_ref.h | 4 +- tools/lib/h5tools_str.h | 8 +- tools/lib/h5tools_utils.h | 8 +- tools/lib/h5trav.h | 6 +- tools/lib/io_timer.h | 6 +- tools/lib/ph5diff.h | 6 +- 53 files changed, 431 insertions(+), 430 deletions(-) diff --git a/src/H5ACmodule.h b/src/H5ACmodule.h index b7fc48f..d1f9697 100644 --- a/src/H5ACmodule.h +++ b/src/H5ACmodule.h @@ -11,15 +11,15 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Saturday, September 12, 2015 * * Purpose: This file contains declarations which define macros for the * H5AC package. Including this header means that the source file * is part of the H5AC package. */ -#ifndef _H5ACmodule_H -#define _H5ACmodule_H +#ifndef H5ACmodule_H +#define H5ACmodule_H /* Define the proper control macros for the generic FUNC_ENTER/LEAVE and error * reporting macros. @@ -29,4 +29,4 @@ #define H5_MY_PKG_ERR H5E_CACHE #define H5_MY_PKG_INIT YES -#endif /* _H5ACmodule_H */ +#endif /* H5ACmodule_H */ diff --git a/src/H5ACprivate.h b/src/H5ACprivate.h index 66f590f..e320f72 100644 --- a/src/H5ACprivate.h +++ b/src/H5ACprivate.h @@ -13,12 +13,12 @@ /*------------------------------------------------------------------------- * - * Created: H5ACprivate.h - * Jul 9 1997 - * Robb Matzke + * Created: H5ACprivate.h + * Jul 9 1997 + * Robb Matzke * - * Purpose: Constants and typedefs available to the rest of the - * library. + * Purpose: Constants and typedefs available to the rest of the + * library. * *------------------------------------------------------------------------- */ @@ -26,14 +26,14 @@ #ifndef H5ACprivate_H #define H5ACprivate_H -#include "H5ACpublic.h" /*public prototypes */ +#include "H5ACpublic.h" /*public prototypes */ /* Pivate headers needed by this header */ -#include "H5private.h" /* Generic Functions */ -#include "H5Cprivate.h" /* Cache */ -#include "H5Fprivate.h" /* File access */ -#include "H5Pprivate.h" /* Property lists */ -#include "H5SLprivate.h" /* Skip lists */ +#include "H5private.h" /* Generic Functions */ +#include "H5Cprivate.h" /* Cache */ +#include "H5Fprivate.h" /* File access */ +#include "H5Pprivate.h" /* Property lists */ +#include "H5SLprivate.h" /* Skip lists */ /* Global metadata tag values */ #define H5AC__INVALID_TAG (haddr_t)0 @@ -90,20 +90,20 @@ typedef enum { * * NOTE: test/cache plays games with the f->shared->cache, and thus * setting H5AC_DUMP_STATS_ON_CLOSE will generate constant, - * irrelevant data when run with that test program. See - * comments on setup_cache() / takedown_cache() in test/cache_common.c. + * irrelevant data when run with that test program. See + * comments on setup_cache() / takedown_cache() in test/cache_common.c. * for details. * - * If you need to dump stats at file close in test/cache.c, - * use the dump_stats parameter to takedown_cache(), or call - * H5C_stats() directly. - * JRM -- 4/12/15 + * If you need to dump stats at file close in test/cache.c, + * use the dump_stats parameter to takedown_cache(), or call + * H5C_stats() directly. + * JRM -- 4/12/15 * * Added the H5AC_DUMP_IMAGE_STATS_ON_CLOSE #define, which works much * the same way as H5AC_DUMP_STATS_ON_CLOSE. However, the set of stats * displayed is much smaller, and directed purely at the cache image feature. * - * JRM -- 11/1/15 + * JRM -- 11/1/15 */ #if H5C_COLLECT_CACHE_STATS @@ -132,7 +132,7 @@ typedef enum { #endif /* - * Class methods pertaining to caching. Each type of cached object will + * Class methods pertaining to caching. Each type of cached object will * have a constant variable with permanent life-span that describes how * to cache the object. */ diff --git a/src/H5Bpkg.h b/src/H5Bpkg.h index 0f61461..0a79628 100644 --- a/src/H5Bpkg.h +++ b/src/H5Bpkg.h @@ -12,12 +12,12 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol - * Thursday, May 15, 2003 + * Programmer: Quincey Koziol + * Thursday, May 15, 2003 * - * Purpose: This file contains declarations which are visible only within - * the H5B package. Source files outside the H5B package should - * include H5Bprivate.h instead. + * Purpose: This file contains declarations which are visible only within + * the H5B package. Source files outside the H5B package should + * include H5Bprivate.h instead. */ #if !(defined H5B_FRIEND || defined H5B_MODULE) #error "Do not include this file outside the H5B package!" @@ -30,7 +30,7 @@ #include "H5Bprivate.h" /* Other private headers needed by this file */ -#include "H5ACprivate.h" /* Metadata cache */ +#include "H5ACprivate.h" /* Metadata cache */ #include "H5FLprivate.h" /* Free Lists */ /**************************/ @@ -49,20 +49,20 @@ typedef struct H5B_t { H5AC_info_t cache_info; /* Information for H5AC cache functions */ /* _must_ be first field in structure */ - H5UC_t * rc_shared; /*ref-counted shared info */ - unsigned level; /*node level */ - unsigned nchildren; /*number of child pointers */ - haddr_t left; /*address of left sibling */ - haddr_t right; /*address of right sibling */ + H5UC_t * rc_shared; /*ref-counted shared info */ + unsigned level; /*node level */ + unsigned nchildren; /*number of child pointers */ + haddr_t left; /*address of left sibling */ + haddr_t right; /*address of right sibling */ uint8_t *native; /*array of keys in native format */ - haddr_t *child; /*2k child pointers */ + haddr_t *child; /*2k child pointers */ } H5B_t; /* Callback info for loading a B-tree node into the cache */ typedef struct H5B_cache_ud_t { H5F_t * f; /* File that B-tree node is within */ - const struct H5B_class_t *type; /* Type of tree */ - H5UC_t * rc_shared; /* Ref-counted shared info */ + const struct H5B_class_t *type; /* Type of tree */ + H5UC_t * rc_shared; /* Ref-counted shared info */ } H5B_cache_ud_t; /*****************************/ diff --git a/src/H5Cpkg.h b/src/H5Cpkg.h index 5c3549f..99ba4bd 100644 --- a/src/H5Cpkg.h +++ b/src/H5Cpkg.h @@ -17,13 +17,13 @@ * Purpose: This file contains declarations which are normally visible * only within the H5C package. * - * Source files outside the H5C package should include - * H5Cprivate.h instead. + * Source files outside the H5C package should include + * H5Cprivate.h instead. * - * The one exception to this rule is test/cache.c. The test - * code is easier to write if it can look at the cache's - * internal data structures. Indeed, this is the main - * reason why this file was created. + * The one exception to this rule is test/cache.c. The test + * code is easier to write if it can look at the cache's + * internal data structures. Indeed, this is the main + * reason why this file was created. */ /* clang-format off */ @@ -40,15 +40,16 @@ #include "H5Cprivate.h" /* Other private headers needed by this file */ -#include "H5Clog.h" /* Cache logging */ -#include "H5SLprivate.h" /* Skip lists */ +#include "H5Clog.h" /* Cache logging */ +#include "H5SLprivate.h" /* Skip lists */ /**************************/ /* Package Private Macros */ /**************************/ /* Number of epoch markers active */ -#define H5C__MAX_EPOCH_MARKERS 10 +#define H5C__MAX_EPOCH_MARKERS 10 + /* Cache configuration settings */ #define H5C__HASH_TABLE_LEN (64 * 1024) /* must be a power of 2 */ @@ -76,7 +77,7 @@ * to the HGOTO_ERROR macro, which may not be appropriate in all cases. * If so, we will need versions of the insertion and deletion macros which * do not reference the sanity checking macros. - * JRM - 5/5/04 + * JRM - 5/5/04 * * Changes: * @@ -151,14 +152,14 @@ * sanity checking macros. These macro are used to update the size of * a DLL when one of its entries changes size. * - * JRM - 9/8/05 + * JRM - 9/8/05 * * - Added macros supporting the index list -- a doubly liked list of * all entries in the index. This list is necessary to reduce the * cost of visiting all entries in the cache, which was previously * done via a scan of the hash table. * - * JRM - 10/15/15 + * JRM - 10/15/15 * ****************************************************************************/ @@ -799,6 +800,7 @@ #endif /* H5C_COLLECT_CACHE_STATS */ + /*********************************************************************** * * Hash table access and manipulation macros: @@ -815,13 +817,13 @@ * the clean_index_size and dirty_index_size fields of H5C_t. Also * added macros to allow us to track entry cleans and dirties. * - * JRM -- 11/5/08 + * JRM -- 11/5/08 * * - Updated existing index macros and sanity check macros to maintain * the index_ring_len, index_ring_size, clean_index_ring_size, and * dirty_index_ring_size fields of H5C_t. * - * JRM -- 9/1/15 + * JRM -- 9/1/15 * * - Updated existing index macros and sanity checks macros to * maintain an doubly linked list of all entries in the index. diff --git a/src/H5Cprivate.h b/src/H5Cprivate.h index a640c6a..0c827c6 100644 --- a/src/H5Cprivate.h +++ b/src/H5Cprivate.h @@ -26,11 +26,11 @@ #ifndef H5Cprivate_H #define H5Cprivate_H -#include "H5Cpublic.h" /* public prototypes */ +#include "H5Cpublic.h" /* public prototypes */ /* Private headers needed by this header */ -#include "H5private.h" /* Generic Functions */ -#include "H5Fprivate.h" /* File access */ +#include "H5private.h" /* Generic Functions */ +#include "H5Fprivate.h" /* File access */ /**************************/ /* Library Private Macros */ @@ -44,7 +44,7 @@ * or decrease it if appropriate. Its purposes is to detect corrupt * object sizes, so it probably doesn't matter if it is a bit big. * - * JRM - 5/17/04 + * JRM - 5/17/04 */ #define H5C_MAX_ENTRY_SIZE ((size_t)(32 * 1024 * 1024)) diff --git a/src/H5FDpublic.h b/src/H5FDpublic.h index 8862362..f642f41 100644 --- a/src/H5FDpublic.h +++ b/src/H5FDpublic.h @@ -315,9 +315,9 @@ typedef struct H5FD_free_t { * are declared here and the driver appends private fields in memory. */ struct H5FD_t { - hid_t driver_id; /* Driver ID for this file */ - const H5FD_class_t *cls; /* Constant class info */ - unsigned long fileno; /* File 'serial' number */ + hid_t driver_id; /*driver ID for this file */ + const H5FD_class_t *cls; /*constant class info */ + unsigned long fileno; /* File 'serial' number */ unsigned access_flags; /* File access flags (from create or open) */ unsigned long feature_flags; /* VFL Driver feature Flags */ haddr_t maxaddr; /* For this file, overrides class */ diff --git a/test/bittests.c b/test/bittests.c index 75fb872..5e83dfe 100644 --- a/test/bittests.c +++ b/test/bittests.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, June 16, 1998 * * Purpose: Tests functions in H5Tbit.c diff --git a/test/cache_api.c b/test/cache_api.c index 7a3a2be..75e1b9d 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -1216,9 +1216,9 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) /* do random reads on all datasets */ n = 0; while ((pass) && (n < NUM_RANDOM_ACCESSES)) { - m = rand() % NUM_DSETS; - i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; - j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + m = HDrand() % NUM_DSETS; + i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; /* select on disk hyperslab */ offset[0] = (hsize_t)i; /*offset of hyperslab in file*/ @@ -1328,8 +1328,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) m = 0; n = 0; while ((pass) && (n < NUM_RANDOM_ACCESSES)) { - i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; - j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; /* select on disk hyperslab */ offset[0] = (hsize_t)i; /*offset of hyperslab in file*/ diff --git a/test/cache_common.h b/test/cache_common.h index 3ee931f..1f3f5ad 100644 --- a/test/cache_common.h +++ b/test/cache_common.h @@ -17,8 +17,8 @@ * This file contains common #defines, type definitions, and * externs for tests of the cache implemented in H5C.c */ -#ifndef _CACHE_COMMON_H -#define _CACHE_COMMON_H +#ifndef CACHE_COMMON_H +#define CACHE_COMMON_H #define H5C_FRIEND /*suppress error about including H5Cpkg */ #define H5F_FRIEND /*suppress error about including H5Fpkg */ @@ -639,4 +639,4 @@ H5TEST_DLL void dump_LRU(H5F_t * file_ptr); } #endif -#endif /* _CACHE_COMMON_H */ +#endif /* CACHE_COMMON_H */ diff --git a/test/cache_logging.c b/test/cache_logging.c index 1ae908b..448e12b 100644 --- a/test/cache_logging.c +++ b/test/cache_logging.c @@ -76,7 +76,7 @@ test_logging_api(void) if (H5Pget_mdc_log_options(fapl, &is_enabled_out, location, &size, &start_on_access_out) < 0) TEST_ERROR; if ((is_enabled != is_enabled_out) || (start_on_access != start_on_access_out) || - HDstrcmp(LOG_LOCATION, location)) + HDstrcmp(LOG_LOCATION, location) != 0) TEST_ERROR; /* Create a file */ diff --git a/test/chunk_info.c b/test/chunk_info.c index 9390e6d..4a661eb 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -541,7 +541,7 @@ test_get_chunk_info_highest_v18(hid_t fapl) #ifdef H5_HAVE_FILTER_DEFLATE /* Allocate input (compressed) buffer */ - inbuf = malloc(z_dst_nbytes); + inbuf = HDcalloc(1, z_dst_nbytes); /* Set chunk size to the compressed chunk size and the chunk point to the compressed data chunk */ @@ -553,20 +553,20 @@ test_get_chunk_info_highest_v18(hid_t fapl) /* Check for various zlib errors */ if (Z_BUF_ERROR == ret) { - fprintf(stderr, "overflow"); + HDfprintf(stderr, "overflow"); TEST_ERROR } else if (Z_MEM_ERROR == ret) { - fprintf(stderr, "deflate memory error"); + HDfprintf(stderr, "deflate memory error"); TEST_ERROR } else if (Z_OK != ret) { - fprintf(stderr, "other deflate error"); + HDfprintf(stderr, "other deflate error"); TEST_ERROR } #else /* Allocate input (non-compressed) buffer */ - inbuf = malloc(CHK_SIZE); + inbuf = HDcalloc(1, CHK_SIZE); HDmemcpy(inbuf, direct_buf, CHK_SIZE); #endif /* end H5_HAVE_FILTER_DEFLATE */ @@ -1637,7 +1637,7 @@ test_basic_query(hid_t fapl) TEST_ERROR /* Remove the test file */ - remove(filename); + HDremove(filename); PASSED(); return SUCCEED; @@ -2045,7 +2045,7 @@ test_flt_msk_with_skip_compress(hid_t fapl) TEST_ERROR /* Remove the test file */ - remove(filename); + HDremove(filename); PASSED(); return SUCCEED; diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index 6fb157c..e74b438 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, January 23, 1998 */ @@ -302,7 +302,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] || s1[i].d != s2[i].d || s1[i].e != s2[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -339,7 +339,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] || s1[i].d != s3[i].d || s1[i].e != s3[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -369,7 +369,7 @@ test_compound(char *filename, hid_t fapl) for (i = 0; i < NX * NY; i++) { if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -413,7 +413,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] || s1[i].d != s5[i].d || s1[i].e != s5[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -423,7 +423,7 @@ test_compound(char *filename, hid_t fapl) if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i || s5[i].post != 1003 + 4 * i) { H5_FAILED(); - puts(" Memory values were clobbered"); + HDputs(" Memory values were clobbered"); goto error; } } @@ -482,7 +482,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] || s1[i].d != s6[i].d || s1[i].e != s6[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -492,7 +492,7 @@ test_compound(char *filename, hid_t fapl) if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i || s6[i].post != 1003 + 4 * i) { H5_FAILED(); - puts(" Memory values were clobbered"); + HDputs(" Memory values were clobbered"); goto error; } } @@ -561,7 +561,7 @@ test_compound(char *filename, hid_t fapl) s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] || s2[i].d != s1[i].d || s2[i].e != s1[i].e) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -590,7 +590,7 @@ test_compound(char *filename, hid_t fapl) /* Read the dataset */ s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t)); - assert(s8); + HDassert(s8); if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) { goto error; } @@ -604,7 +604,7 @@ test_compound(char *filename, hid_t fapl) if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] || ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -643,7 +643,7 @@ test_compound(char *filename, hid_t fapl) ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] || ps2->d != ps1->d || ps2->e != ps1->e) { H5_FAILED(); - puts(" Memory values clobbered"); + HDputs(" Memory values clobbered"); goto error; } } @@ -652,7 +652,7 @@ test_compound(char *filename, hid_t fapl) ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) || ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -691,7 +691,7 @@ test_compound(char *filename, hid_t fapl) ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) || ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) { H5_FAILED(); - puts(" Memory values clobbered"); + HDputs(" Memory values clobbered"); goto error; } } @@ -702,7 +702,7 @@ test_compound(char *filename, hid_t fapl) ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) || ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -723,7 +723,7 @@ test_compound(char *filename, hid_t fapl) h_size[0] = 2 * NX / 3 - f_offset[0]; h_size[1] = 2 * NY / 3 - f_offset[1]; s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t)); - assert(s11); + HDassert(s11); /* Initialize */ for (i = 0; i < h_size[0] * h_size[1]; i++) { @@ -751,7 +751,7 @@ test_compound(char *filename, hid_t fapl) ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 || ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) { H5_FAILED(); - puts(" Write clobbered values"); + HDputs(" Write clobbered values"); goto error; } @@ -759,14 +759,14 @@ test_compound(char *filename, hid_t fapl) j < f_offset[1] + h_size[1]) { if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) { H5_FAILED(); - puts(" Wrong values written or read"); + HDputs(" Wrong values written or read"); goto error; } } else { if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) { H5_FAILED(); - puts(" Write clobbered values"); + HDputs(" Write clobbered values"); goto error; } } @@ -792,7 +792,7 @@ test_compound(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); /* Release resources */ if (s1) @@ -1669,7 +1669,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); return 1; } @@ -1684,7 +1684,7 @@ error: for (_i = 0; _i < PACK_NMEMBS; _i++) \ HDprintf(" %d", order[_i]); \ HDprintf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \ - fflush(stdout); \ + HDfflush(stdout); \ goto error; \ } @@ -1719,7 +1719,7 @@ test_pack_ooo(void) * the compound */ unsigned i, j; /* Indices */ - HDsrand((unsigned)time(NULL)); + HDsrand((unsigned)HDtime(NULL)); /* Initialize "free_order" array to indicate that all slots in order are * free */ @@ -2233,7 +2233,7 @@ main(int argc, char *argv[]) /* Turn off optimized compound converter? */ if (argc > 1) { - if (argc > 2 || strcmp("--noopt", argv[1])) { + if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) { HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]); HDexit(EXIT_FAILURE); } diff --git a/test/cross_read.c b/test/cross_read.c index ace06c2..386c0da 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Thursday, March 23, 2006 * * Purpose: Check if floating-point data created on big-endian and diff --git a/test/dangle.c b/test/dangle.c index 50fef71..d41507b 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Tuesday, May 13, 2003 * * Purpose: Test dangling IDs @@ -663,7 +663,7 @@ main(void) int nerrors = 0; /* Run tests w/weak file close */ - puts("Testing dangling objects with weak file close:"); + HDputs("Testing dangling objects with weak file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_WEAK); nerrors += test_dangle_group(H5F_CLOSE_WEAK); nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK); @@ -671,7 +671,7 @@ main(void) nerrors += test_dangle_attribute(H5F_CLOSE_WEAK); /* Run tests w/semi file close */ - puts("Testing dangling objects with semi file close:"); + HDputs("Testing dangling objects with semi file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_SEMI); nerrors += test_dangle_group(H5F_CLOSE_SEMI); nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI); @@ -679,7 +679,7 @@ main(void) nerrors += test_dangle_attribute(H5F_CLOSE_SEMI); /* Run tests w/strong file close */ - puts("Testing dangling objects with strong file close:"); + HDputs("Testing dangling objects with strong file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_STRONG); nerrors += test_dangle_group(H5F_CLOSE_STRONG); nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG); @@ -692,11 +692,11 @@ main(void) /* Check for errors */ if (nerrors) goto error; - puts("All dangling ID tests passed."); + HDputs("All dangling ID tests passed."); return 0; error: - puts("***** DANGLING ID TESTS FAILED *****"); + HDputs("***** DANGLING ID TESTS FAILED *****"); return 1; } diff --git a/test/direct_chunk.c b/test/direct_chunk.c index 7db7242..61e3df9 100644 --- a/test/direct_chunk.c +++ b/test/direct_chunk.c @@ -2326,7 +2326,7 @@ main(void) need_comma = TRUE; } /* end if */ HDprintf(":\n"); - fflush(stdout); + HDfflush(stdout); nerrors += test_single_chunk(config); } /* end for */ diff --git a/test/dt_arith.c b/test/dt_arith.c index 94bcb32..f2bf6cf 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, December 9, 1997 * * Purpose: Tests the data type interface (H5T) @@ -84,7 +84,7 @@ static int skip_overflow_tests_g = 0; * be allowed to continue (cf. Posix signals) so in order to recover from a * SIGFPE we run tests that might generate one in a child process. */ -#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) +#ifdef H5_HAVE_UNISTD_H #define HANDLE_SIGFPE #endif @@ -359,7 +359,7 @@ static int without_hardware_g = 0; \ for (n = 0; n < 2; n++) { \ if (n == 1) { \ - memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \ + HDmemset(value, 0, SRC_SIZE * sizeof(unsigned char)); \ /* -0 */ \ H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \ CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \ @@ -397,8 +397,8 @@ static int without_hardware_g = 0; void some_dummy_func(float x); static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits); static int my_isnan(dtype_t type, void *val); -static int my_isinf(int endian, unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, - size_t esize); +static int my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, + size_t esize); /*------------------------------------------------------------------------- * Function: fpe_handler @@ -556,7 +556,7 @@ some_dummy_func(float x) static void generates_sigfpe(void) { -#if defined(H5_HAVE_FORK) && defined(H5_HAVE_WAITPID) +#ifdef H5_HAVE_UNISTD_H pid_t pid; int status; size_t i, j; @@ -566,7 +566,7 @@ generates_sigfpe(void) HDfflush(stdout); HDfflush(stderr); - if ((pid = fork()) < 0) { + if ((pid = HDfork()) < 0) { HDperror("fork"); HDexit(EXIT_FAILURE); } @@ -580,7 +580,7 @@ generates_sigfpe(void) HDexit(EXIT_SUCCESS); } - while (pid != waitpid(pid, &status, 0)) + while (pid != HDwaitpid(pid, &status, 0)) /*void*/; if (WIFEXITED(status) && 0 == WEXITSTATUS(status)) { HDputs("Floating-point overflow cases will be tested."); @@ -592,12 +592,12 @@ generates_sigfpe(void) /* delete the core dump file that SIGFPE may have created */ HDunlink("core"); } -#else - HDputs("Cannot determine if floating-point overflows generate a SIGFPE;"); - HDputs("assuming yes."); +#else /* H5_HAVE_UNISTD_H */ + HDputs("Cannot determine if floating-point overflows generate a SIGFPE"); + HDputs("due to a lack of fork(2) - assuming yes."); HDputs("Overflow cases will not be tested."); skip_overflow_tests_g = TRUE; -#endif +#endif /* H5_HAVE_UNISTD_H */ } /*------------------------------------------------------------------------- @@ -775,7 +775,7 @@ test_particular_fp_integer(void) /* Print errors */ if (dst_c != SCHAR_MAX) { - double x = 0.; + double x = 0.0; signed char y; if (0 == fails_this_test++) @@ -819,7 +819,7 @@ test_particular_fp_integer(void) /* Print errors */ if (dst_i != fill_value) { - float x = 0.; + float x = 0.0; int y; if (0 == fails_this_test++) @@ -2391,7 +2391,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) } /* Make certain that there isn't some weird number of destination bits */ - assert(dst_nbits % 8 == 0); + HDassert(dst_nbits % 8 == 0); /* Are the two results the same? */ for (k = (dst_size - (dst_nbits / 8)); k < dst_size; k++) @@ -2786,18 +2786,18 @@ my_isnan(dtype_t type, void *val) char s[256]; if (FLT_FLOAT == type) { - float x = 0.; + float x = 0.0; HDmemcpy(&x, val, sizeof(float)); retval = (x != x); } else if (FLT_DOUBLE == type) { - double x = 0.; + double x = 0.0; HDmemcpy(&x, val, sizeof(double)); retval = (x != x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0 } else if (FLT_LDOUBLE == type) { - long double x = 0.; + long double x = 0.0; HDmemcpy(&x, val, sizeof(long double)); retval = (x != x); #endif @@ -2812,20 +2812,20 @@ my_isnan(dtype_t type, void *val) */ if (!retval) { if (FLT_FLOAT == type) { - float x = 0.; + float x = 0.0; HDmemcpy(&x, val, sizeof(float)); HDsnprintf(s, sizeof(s), "%g", (double)x); } else if (FLT_DOUBLE == type) { - double x = 0.; + double x = 0.0; HDmemcpy(&x, val, sizeof(double)); HDsnprintf(s, sizeof(s), "%g", x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE && H5_SIZEOF_LONG_DOUBLE != 0 } else if (FLT_LDOUBLE == type) { - long double x = 0.; + long double x = 0.0; HDmemcpy(&x, val, sizeof(long double)); HDsnprintf(s, sizeof(s), "%Lg", x); @@ -2856,7 +2856,8 @@ my_isnan(dtype_t type, void *val) *------------------------------------------------------------------------- */ static int -my_isinf(int endian, unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, size_t esize) +my_isinf(int endian, const unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, + size_t esize) { unsigned char *bits; int retval = 0; @@ -2948,12 +2949,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) */ HDfflush(stdout); HDfflush(stderr); - if ((child_pid = fork()) < 0) { + if ((child_pid = HDfork()) < 0) { HDperror("fork"); return 1; } else if (child_pid > 0) { - while (child_pid != waitpid(child_pid, &status, 0)) /*void*/ + while (child_pid != HDwaitpid(child_pid, &status, 0)) /*void*/ ; if (WIFEXITED(status) && 255 == WEXITSTATUS(status)) { return 0; /*child exit after catching SIGFPE*/ @@ -3022,7 +3023,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) if (sizeof(float) == sizeof(double)) HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible."); if (OTHER == src_type || OTHER == dst_type) { - if (!strcmp(name, "noop")) + if (!HDstrcmp(name, "noop")) HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if (run_test == TEST_SPECIAL) @@ -3041,7 +3042,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) goto error; } else { - if (!strcmp(name, "noop")) + if (!HDstrcmp(name, "noop")) HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if (run_test == TEST_SPECIAL) @@ -3286,7 +3287,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) int check_expo[2]; if (FLT_FLOAT == dst_type) { - float x = 0.; + float x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(float)); if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN) continue; /* all underflowed, no error */ @@ -3297,7 +3298,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) check_mant[1] = HDfrexpf(hw_f, check_expo + 1); } else if (FLT_DOUBLE == dst_type) { - double x = 0.; + double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(double)); if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN) continue; /* all underflowed, no error */ @@ -3309,7 +3310,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) #if H5_SIZEOF_LONG_DOUBLE != 0 && (H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE) } else { - long double x = 0.; + long double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(long double)); /* dst is largest float, no need to check underflow. */ check_mant[0] = (double)HDfrexpl(x, check_expo + 0); @@ -3356,18 +3357,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) HDprintf(" %02x", saved[j * src_size + ENDIAN(src_size, k, sendian)]); HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)dst_size - (ssize_t)src_size)), ""); if (FLT_FLOAT == src_type) { - float x = 0.; + float x = 0.0; HDmemcpy(&x, &saved[j * src_size], sizeof(float)); HDprintf(" %29.20e\n", (double)x); } else if (FLT_DOUBLE == src_type) { - double x = 0.; + double x = 0.0; HDmemcpy(&x, &saved[j * src_size], sizeof(double)); HDprintf(" %29.20e\n", x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE } else { - long double x = 0.; + long double x = 0.0; HDmemcpy(&x, &saved[j * src_size], sizeof(long double)); HDfprintf(stdout, " %29.20Le\n", x); #endif @@ -3378,18 +3379,18 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) HDprintf(" %02x", buf[j * dst_size + ENDIAN(dst_size, k, dendian)]); HDprintf("%*s", (int)(3 * MAX(0, (ssize_t)src_size - (ssize_t)dst_size)), ""); if (FLT_FLOAT == dst_type) { - float x = 0.; + float x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(float)); HDprintf(" %29.20e\n", (double)x); } else if (FLT_DOUBLE == dst_type) { - double x = 0.; + double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(double)); HDprintf(" %29.20e\n", x); #if H5_SIZEOF_LONG_DOUBLE != H5_SIZEOF_DOUBLE } else { - long double x = 0.; + long double x = 0.0; HDmemcpy(&x, &buf[j * dst_size], sizeof(long double)); HDfprintf(stdout, " %29.20Le\n", x); #endif @@ -4350,7 +4351,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) } /* Make certain that there isn't some weird number of destination bits */ - assert(dst_nbits % 8 == 0); + HDassert(dst_nbits % 8 == 0); /* For Intel machines, the size of "long double" is 12 bytes, precision * is 80 bits; for AMD processors, the size of "long double" is 16 bytes, @@ -5009,7 +5010,7 @@ run_fp_tests(const char *name) { int nerrors = 0; - if (!strcmp(name, "noop")) { + if (!HDstrcmp(name, "noop")) { nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT); nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE); #if H5_SIZEOF_LONG_DOUBLE != 0 @@ -5246,7 +5247,7 @@ run_fp_int_conv(const char *name) #endif #if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG - if (!strcmp(name, "hw")) { /* Hardware conversion */ + if (!HDstrcmp(name, "hw")) { /* Hardware conversion */ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); } diff --git a/test/dtransform.c b/test/dtransform.c index 895f22e..c679d30 100644 --- a/test/dtransform.c +++ b/test/dtransform.c @@ -18,12 +18,12 @@ #define FLOAT_TOL 0.0001F static int init_test(hid_t file_id); -static int test_copy(const hid_t dxpl_id_c_to_f_copy, const hid_t dxpl_id_polynomial_copy); -static int test_trivial(const hid_t dxpl_id_simple); -static int test_poly(const hid_t dxpl_id_polynomial); +static int test_copy(hid_t dxpl_id_c_to_f_copy, hid_t dxpl_id_polynomial_copy); +static int test_trivial(hid_t dxpl_id_simple); +static int test_poly(hid_t dxpl_id_polynomial); static int test_specials(hid_t file); static int test_set(void); -static int test_getset(const hid_t dxpl_id_simple); +static int test_getset(hid_t dxpl_id_simple); /* These are needed for multiple tests, so are declared here globally and are init'ed in init_test */ hid_t dset_id_int = -1; diff --git a/test/enum.c b/test/enum.c index c1e750d..3923892 100644 --- a/test/enum.c +++ b/test/enum.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, December 22, 1998 */ #include "h5test.h" @@ -792,11 +792,11 @@ main(void) if (nerrors) goto error; - puts("All enum tests passed."); + HDputs("All enum tests passed."); h5_cleanup(FILENAME, fapl); return 0; error: - puts("*** ENUM TESTS FAILED ***"); + HDputs("*** ENUM TESTS FAILED ***"); return 1; } diff --git a/test/error_test.c b/test/error_test.c index dd7099c..c8205ff8 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -129,13 +129,8 @@ test_error(hid_t file) TEST_ERROR; if (old_data != NULL) TEST_ERROR; -#ifdef H5_USE_16_API - if (old_func != (H5E_auto_t)H5Eprint) - TEST_ERROR; -#else /* H5_USE_16_API */ if (old_func != (H5E_auto2_t)H5Eprint2) TEST_ERROR; -#endif /* H5_USE_16_API */ if (H5Eset_auto2(H5E_DEFAULT, NULL, NULL) < 0) TEST_ERROR; @@ -200,7 +195,7 @@ init_error(void) if (cls_size != H5Eget_class_name(ERR_CLS, cls_name, (size_t)cls_size) + 1) TEST_ERROR; - if (HDstrcmp(ERR_CLS_NAME, cls_name)) + if (HDstrcmp(ERR_CLS_NAME, cls_name) != 0) TEST_ERROR; if ((ERR_MAJ_TEST = H5Ecreate_msg(ERR_CLS, H5E_MAJOR, ERR_MAJ_TEST_MSG)) < 0) @@ -225,7 +220,7 @@ init_error(void) TEST_ERROR; if (msg_type != H5E_MINOR) TEST_ERROR; - if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG)) + if (HDstrcmp(msg, ERR_MIN_SUBROUTINE_MSG) != 0) TEST_ERROR; /* Register another class for later testing. */ diff --git a/test/extend.c b/test/extend.c index 9cb7220..2583de9 100644 --- a/test/extend.c +++ b/test/extend.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, January 30, 1998 * * Purpose: Tests extendible datasets. diff --git a/test/external.c b/test/external.c index a5621e8..c31701d 100644 --- a/test/external.c +++ b/test/external.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Tuesday, March 3, 1998 * * Purpose: Tests datasets stored in external raw files. @@ -72,7 +72,7 @@ files_have_same_contents(const char *name1, const char *name2) break; } - if (HDmemcmp(buf1, buf2, (size_t)n1)) + if (HDmemcmp(buf1, buf2, (size_t)n1) != 0) break; } /* end while */ @@ -474,7 +474,7 @@ error: *------------------------------------------------------------------------- */ static int -__add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, hsize_t max_ext_size) +add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, hsize_t max_ext_size) { char exname[AEF_EXNAME_MAX_LEN + 1]; unsigned int i = 0; @@ -485,12 +485,12 @@ __add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, for (i = 0; i < n_external_files; i++) { if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) { HDfprintf(stderr, "External file %d overflows name buffer\n", i + 1); - fflush(stderr); + HDfflush(stderr); return -1; } if (H5Pset_external(dcpl_id, exname, offset, max_ext_size) < 0) { HDfprintf(stderr, "Problem adding external file %s\n", exname); - fflush(stderr); + HDfflush(stderr); return -1; } } @@ -528,7 +528,7 @@ test_multiple_files(hid_t file) max_ext_size = (hsize_t)(sizeof(int) * max_size[0] / n_external_files); - if (__add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) { + if (add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) { FAIL_STACK_ERROR; } @@ -552,7 +552,7 @@ test_multiple_files(hid_t file) max_ext_size -= 1; - if (__add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) { + if (add_external_files(dcpl, n_external_files, 0, max_ext_size) < 0) { FAIL_STACK_ERROR; } @@ -965,7 +965,7 @@ test_path_absolute(hid_t fapl) hid_t dset = -1; /* dataset */ size_t i = 0; /* miscellaneous counter */ char cwdpath[1024]; /* working directory */ - char filename[1024]; /* file name */ + char filename[1088]; /* file name */ int part[PART_SIZE]; /* raw data buffer (partial) */ int whole[TOTAL_SIZE]; /* raw data buffer (total) */ hsize_t cur_size; /* current data space size */ @@ -1059,7 +1059,6 @@ test_path_relative(hid_t fapl) hid_t space = -1; /* data space */ hid_t dset = -1; /* dataset */ size_t i = 0; /* miscellaneous counters */ - char cwdpath[1024]; /* working directory */ char filename[1024]; /* file name */ int part[PART_SIZE]; /* raw data buffer (partial) */ int whole[TOTAL_SIZE]; /* raw data buffer (total) */ @@ -1084,8 +1083,6 @@ test_path_relative(hid_t fapl) /* Create the dataset */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR - if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath))) - TEST_ERROR for (i = 0; i < N_EXT_FILES; i++) { HDsnprintf(filename, sizeof(filename), "extern_%dr.raw", (int)i + 1); if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0) @@ -1158,7 +1155,6 @@ test_path_relative_cwd(hid_t fapl) hid_t dset2 = -1; /* dataset, opened a second time */ hid_t dset3 = -1; /* dataset, opened with different prefix */ size_t i = 0; /* miscellaneous counters */ - char cwdpath[1024]; /* working directory */ char filename[1024]; /* file name */ int part[PART_SIZE]; /* raw data buffer (partial) */ int whole[TOTAL_SIZE]; /* raw data buffer (total) */ @@ -1184,8 +1180,6 @@ test_path_relative_cwd(hid_t fapl) /* Create the dataset */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR - if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath))) - TEST_ERROR for (i = 0; i < N_EXT_FILES; i++) { HDsnprintf(filename, sizeof(filename), "..%sextern_%dr.raw", H5_DIR_SEPS, (int)i + 1); if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0) diff --git a/test/external_common.c b/test/external_common.c index d616104..c37fd16 100644 --- a/test/external_common.c +++ b/test/external_common.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * April, 2019 * * Purpose: Private function for external.c and external_env.c diff --git a/test/external_common.h b/test/external_common.h index 6e2915f..6215be9 100644 --- a/test/external_common.h +++ b/test/external_common.h @@ -12,13 +12,13 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * April, 2019 * * Purpose: Private function for external.c and external_env.c */ -#ifndef _EXTERNAL_COMMON_H -#define _EXTERNAL_COMMON_H +#ifndef EXTERNAL_COMMON_H +#define EXTERNAL_COMMON_H /* Include test header files */ #include "h5test.h" @@ -41,4 +41,4 @@ H5TEST_DLL herr_t reset_raw_data_files(hbool_t is_env); } #endif -#endif /* _EXTERNAL_COMMON_H */ +#endif /* EXTERNAL_COMMON_H */ diff --git a/test/external_env.c b/test/external_env.c index 4ab569f..5dc1d65 100644 --- a/test/external_env.c +++ b/test/external_env.c @@ -48,7 +48,6 @@ test_path_env(hid_t fapl) hid_t dapl = -1; /* dataset access property list */ hid_t dset = -1; /* dataset */ size_t i; /* miscellaneous counters */ - char cwdpath[1024]; /* working directory */ char filename[1024]; /* file name */ int part[PART_SIZE]; /* raw data buffer (partial) */ int whole[TOTAL_SIZE]; /* raw data buffer (total) */ @@ -71,8 +70,6 @@ test_path_env(hid_t fapl) /* Create the dataset */ if ((dcpl = H5Pcreate(H5P_DATASET_CREATE)) < 0) FAIL_STACK_ERROR - if (NULL == HDgetcwd(cwdpath, sizeof(cwdpath))) - TEST_ERROR for (i = 0; i < N_EXT_FILES; i++) { HDsnprintf(filename, sizeof(filename), "..%sextern_env_%dr.raw", H5_DIR_SEPS, (int)i + 1); if (H5Pset_external(dcpl, filename, (off_t)(i * GARBAGE_PER_FILE), (hsize_t)sizeof(part)) < 0) diff --git a/test/external_fname.h b/test/external_fname.h index 40b9f51..c2cd059 100644 --- a/test/external_fname.h +++ b/test/external_fname.h @@ -12,13 +12,13 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * July, 2019 * * Purpose: Private declaration for external.c and external_env.c */ -#ifndef _EXTERNAL_FNAME_H -#define _EXTERNAL_FNAME_H +#ifndef EXTERNAL_FNAME_H +#define EXTERNAL_FNAME_H /* Include test header files */ #include "h5test.h" @@ -26,4 +26,4 @@ static const char *EXT_FNAME[] = {"extern_1", "extern_2", "extern_3", "extern_4", "extern_dir/file_1", "extern_5", NULL}; -#endif /* _EXTERNAL_FNAME_H */ +#endif /* EXTERNAL_FNAME_H */ diff --git a/test/filenotclosed.c b/test/filenotclosed.c index f7c658f..b5def9b 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -77,10 +77,10 @@ main(void) * Further investigation is needed to resolve the test failure with the * split/multi driver. Please see HDFFV-10160. */ - contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")); + contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0); if (!contig_addr_vfd) { SKIPPED(); - puts(" Temporary skipped for a spilt/multi driver"); + HDputs(" Temporary skipped for a spilt/multi driver"); HDexit(EXIT_SUCCESS); } diff --git a/test/fillval.c b/test/fillval.c index 6c32d98..673b267 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, October 1, 1998 * * Purpose: Tests dataset fill values. @@ -207,7 +207,7 @@ test_getset(void) H5E_END_TRY; if (fill_i != 0) { H5_FAILED(); - puts(" H5Pget_fill_value() should return default 0"); + HDputs(" H5Pget_fill_value() should return default 0"); goto error; } @@ -226,8 +226,8 @@ test_getset(void) goto error; if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) { H5_FAILED(); - puts(" Failed to get fill value using same data type that was "); - puts(" used to set the fill value."); + HDputs(" Failed to get fill value using same data type that was "); + HDputs(" used to set the fill value."); goto error; } @@ -238,8 +238,8 @@ test_getset(void) goto error; if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) { H5_FAILED(); - puts(" Failed to get fill value using a data type other than what"); - puts(" was used to set the fill value."); + HDputs(" Failed to get fill value using a data type other than what"); + HDputs(" was used to set the fill value."); goto error; } @@ -252,7 +252,7 @@ test_getset(void) goto error; if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) { H5_FAILED(); - puts(" Resetting the fill value was unsuccessful."); + HDputs(" Resetting the fill value was unsuccessful."); goto error; } @@ -324,7 +324,7 @@ test_getset_vl(hid_t fapl) TEST_ERROR /* Verify that the fill value is the original value */ - if (HDstrcmp(f2, orig_fill_value)) + if (HDstrcmp(f2, orig_fill_value) != 0) TEST_ERROR /* Release the fill value retrieved */ @@ -366,7 +366,7 @@ test_getset_vl(hid_t fapl) TEST_ERROR /* Verify that the fill value is the original value */ - if (HDstrcmp(f2, orig_fill_value)) + if (HDstrcmp(f2, orig_fill_value) != 0) TEST_ERROR /* Release the fill value retrieved */ @@ -670,12 +670,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_LATE) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (fill_time != H5D_FILL_TIME_ALLOC) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset3) < 0) @@ -690,7 +690,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) { H5_FAILED(); - puts(" Got allocated space instead of unallocated."); + HDputs(" Got allocated space instead of unallocated."); HDprintf(" Got %d\n", allocation); goto error; } @@ -702,12 +702,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_LATE) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (fill_time != H5D_FILL_TIME_NEVER) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset4) < 0) @@ -725,7 +725,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 || rd_c.z != '\0') { H5_FAILED(); - puts(" Got wrong fill value"); + HDputs(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } @@ -754,14 +754,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_EARLY) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if (fill_time != H5D_FILL_TIME_NEVER) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset5) < 0) @@ -794,14 +794,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_EARLY) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if (fill_time != H5D_FILL_TIME_ALLOC) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset6) < 0) @@ -819,7 +819,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 || rd_c.z != '\0') { H5_FAILED(); - puts(" Got wrong fill value"); + HDputs(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } @@ -1532,8 +1532,8 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_ (const comp_vl_datatype *)_compare_val; /* Value to compare against */ /* Verify value */ - if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) || - HDstrcmp(test_val->b, compare_val->b) || (test_val->y != compare_val->y)) { + if ((test_val->x != compare_val->x) || HDstrcmp(test_val->a, compare_val->a) != 0 || + HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) { HDfprintf(stdout, "%u: Value read was not expected.\n", lineno); HDfprintf(stdout, " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: {%d, '%s', '%s', %d} " @@ -1588,7 +1588,7 @@ test_extend_release_cmpd_vl(void *_elmt) *------------------------------------------------------------------------- */ static int -test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_size, hsize_t *start_size, +test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t *ch_size, hsize_t *start_size, hsize_t *max_size, hid_t dtype, void *fillval) { hid_t fspace = -1, mspace = -1; /* File & memory dataspaces */ @@ -1651,7 +1651,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si } /* end if */ else { /* Sanity check */ - assert(dtype_class == H5T_COMPOUND); + HDassert(dtype_class == H5T_COMPOUND); /* Initialize specific values for this datatype */ val_size = sizeof(comp_vl_datatype); @@ -1703,7 +1703,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, hsize_t *ch_si } /* end for */ /* Check for overflow */ - assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); + HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); /* Allocate & initialize buffer */ buf = HDmalloc((size_t)(nelmts * val_size)); @@ -2143,7 +2143,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) */ if (H5D_CONTIGUOUS == layout) { SKIPPED(); - puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); + HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); goto skip; } #endif @@ -2261,7 +2261,7 @@ test_compatible(void) goto error; if (dims[0] != 8 || dims[1] != 8) { H5_FAILED(); - puts(" Got a different dimension size than what was set."); + HDputs(" Got a different dimension size than what was set."); HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]); goto error; } @@ -2273,7 +2273,7 @@ test_compatible(void) goto error; if (val_rd != 0) { H5_FAILED(); - puts(" Got a different value than what was set."); + HDputs(" Got a different value than what was set."); HDprintf(" Got %ld, set 0\n", (long)val_rd); goto error; } @@ -2314,7 +2314,7 @@ test_compatible(void) goto error; if (dims[0] != 8 || dims[1] != 8) { H5_FAILED(); - puts(" Got a different dimension size than what was set."); + HDputs(" Got a different dimension size than what was set."); HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]); goto error; } @@ -2326,7 +2326,7 @@ test_compatible(void) goto error; if (val_rd != fill_val) { H5_FAILED(); - puts(" Got a different value than what was set."); + HDputs(" Got a different value than what was set."); HDprintf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val); goto error; } @@ -2661,11 +2661,11 @@ main(int argc, char *argv[]) if (argc >= 2) { test_contig = test_chunk = test_compact = 0; for (argno = 1; argno < argc; argno++) { - if (!strcmp(argv[argno], "contiguous")) + if (!HDstrcmp(argv[argno], "contiguous")) test_contig = 1; - else if (!strcmp(argv[argno], "chunked")) + else if (!HDstrcmp(argv[argno], "chunked")) test_chunk = 1; - else if (!strcmp(argv[argno], "compact")) + else if (!HDstrcmp(argv[argno], "compact")) test_compact = 1; else { HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]); @@ -2695,11 +2695,11 @@ main(int argc, char *argv[]) /* Set the FAPL for the type of format */ if (new_format) { - puts("\nTesting with new file format:"); + HDputs("\nTesting with new file format:"); my_fapl = fapl2; } /* end if */ else { - puts("Testing with old file format:"); + HDputs("Testing with old file format:"); my_fapl = fapl; } /* end else */ diff --git a/test/filter_fail.c b/test/filter_fail.c index bcad18d..a1bcf28 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * 7 September 2010 * * Purpose: Make sure dataset, file, and library can close properly when a @@ -174,7 +174,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Data writing is supposed to fail because the chunk can't be written to file."); + HDputs(" Data writing is supposed to fail because the chunk can't be written to file."); TEST_ERROR } } @@ -195,7 +195,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Dataset is supposed to fail because the chunk can't be flushed to file."); + HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file."); TEST_ERROR } } diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 60f7171..276141a 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -1068,7 +1068,7 @@ test_path_api_calls(void) /* Get the path */ if ((path_len = H5PLget(0, path, 256)) <= 0) { - HDfprintf(stderr, " get 0 len: %u : %s\n", path_len, path); + HDfprintf(stderr, " get 0 len: %zd : %s\n", path_len, path); TEST_ERROR; } if (HDstrcmp(path, "a_path_0") != 0) { diff --git a/test/flush1.c b/test/flush1.c index dde3963..456f5f4 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, October 23, 1998 * * Purpose: This is the first half of a two-part test that makes sure diff --git a/test/flush2.c b/test/flush2.c index 5f0d42c..3262b14 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Friday, October 23, 1998 * * Purpose: This is the second half of a two-part test that makes sure diff --git a/test/flushrefreshTest.cmake b/test/flushrefreshTest.cmake index 4cb8b93..9a99902 100644 --- a/test/flushrefreshTest.cmake +++ b/test/flushrefreshTest.cmake @@ -41,7 +41,7 @@ endif () message (STATUS "COMMAND: ${TEST_PROGRAM} ${TEST_ARGS}") if (TEST_LIBRARY_DIRECTORY) - if (WIN32 OR MINGW) + if (WIN32) set (ENV{PATH} "$ENV{PATH};${TEST_LIBRARY_DIRECTORY}") else () set (ENV{LD_LIBRARY_PATH} "$ENV{LD_LIBRARY_PATH}:${TEST_LIBRARY_DIRECTORY}") diff --git a/test/gen_bad_compound.c b/test/gen_bad_compound.c index 7cbeda9..d5fcec1 100644 --- a/test/gen_bad_compound.c +++ b/test/gen_bad_compound.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * April 14, 2011 * * Purpose: This program is run to generate an HDF5 data file with objects diff --git a/test/gen_bad_ohdr.c b/test/gen_bad_ohdr.c index c88ec6d..b24371e 100644 --- a/test/gen_bad_ohdr.c +++ b/test/gen_bad_ohdr.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Jan 5, 2008 * * Purpose: This program is run to generate an HDF5 data file with a diff --git a/test/gen_cross.c b/test/gen_cross.c index 7400728..3eac79a 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Raymond Lu + * Programmer: Raymond Lu * Thursday, March 23, 2006 * * This program writes floating-point data to the HDF5 file. It generates @@ -928,7 +928,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) #else /* H5_HAVE_FILTER_DEFLATE */ const char *not_supported = "Deflate filter is not enabled. Can't create the dataset."; - puts(not_supported); + HDputs(not_supported); #endif /* H5_HAVE_FILTER_DEFLATE */ return 0; diff --git a/test/gen_filters.c b/test/gen_filters.c index 1a3d468..7b7c268 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -37,7 +37,7 @@ static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned * * Failure: -1 * - * Programmer: Pedro Vicente + * Programmer: Pedro Vicente * Thursday, March 25, 2004 * *------------------------------------------------------------------------- @@ -243,12 +243,12 @@ main(void) if (nerrors) goto error; - printf("All tests passed.\n"); + HDprintf("All tests passed.\n"); return 0; error: nerrors = MAX(1, nerrors); - printf("***** %d GEN_FILTERS FAILURES *****\n", nerrors); + HDprintf("***** %d GEN_FILTERS FAILURES *****\n", nerrors); return 1; } diff --git a/test/gen_mergemsg.c b/test/gen_mergemsg.c index 38d3f87..d805dbf 100644 --- a/test/gen_mergemsg.c +++ b/test/gen_mergemsg.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Quincey Koziol + * Programmer: Quincey Koziol * Friday, June 30, 2006 * * This program creates an object with fragmented object header messages diff --git a/test/getname.c b/test/getname.c index 4a72fd2..200c426 100644 --- a/test/getname.c +++ b/test/getname.c @@ -12,7 +12,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Pedro Vicente + * Programmer: Pedro Vicente * April 12, 2002 * * Purpose: Tests the "ID to name" functionality @@ -68,11 +68,11 @@ check_name(hid_t id, const char *chk_name, const char *chk_user_path) TEST_ERROR /* Check on name from H5Iget_name() */ - if (HDstrcmp(name, chk_name)) + if (HDstrcmp(name, chk_name) != 0) goto error; /* Check on user path */ - if (HDstrcmp(user_path, chk_user_path)) + if (HDstrcmp(user_path, chk_user_path) != 0) goto error; /* Check that if user path is hidden, the name from H5Iget_name() and the user path should be different */ @@ -1439,7 +1439,7 @@ test_main(hid_t file_id, hid_t fapl) /* Check that name is longer */ if (name_len <= SMALL_NAME_BUF_SIZE) TEST_ERROR - if (HDstrcmp(name2, "/")) + if (HDstrcmp(name2, "/") != 0) TEST_ERROR } @@ -1481,7 +1481,7 @@ test_main(hid_t file_id, hid_t fapl) TEST_ERROR /* Verify */ - if (HDstrcmp(name3, "/g17")) + if (HDstrcmp(name3, "/g17") != 0) TEST_ERROR *name3 = '\0'; @@ -1491,7 +1491,7 @@ test_main(hid_t file_id, hid_t fapl) TEST_ERROR /* Verify */ - if (HDstrcmp(name3, "/g")) + if (HDstrcmp(name3, "/g") != 0) TEST_ERROR HDfree(name3); @@ -3787,7 +3787,7 @@ main(void) if (nerrors) goto error; - puts("All getname tests passed."); + HDputs("All getname tests passed."); h5_cleanup(FILENAME, fapl); @@ -3800,7 +3800,7 @@ error: } H5E_END_TRY; - puts("***** GET NAME TESTS FAILED *****"); + HDputs("***** GET NAME TESTS FAILED *****"); return 1; } diff --git a/test/hyperslab.c b/test/hyperslab.c index 67e4865..a867430 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -11,7 +11,7 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Robb Matzke +/* Programmer: Robb Matzke * Friday, October 10, 1997 * * Purpose: Hyperslab operations are rather complex, so this file @@ -177,7 +177,7 @@ test_fill(size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_t dk, size } /* end else */ HDsprintf(s, "Testing hyperslab fill %-11s variable hyperslab", dim); HDprintf("%-70s", s); - fflush(stdout); + HDfflush(stdout); /* Allocate array */ if (NULL == (dst = (uint8_t *)HDcalloc((size_t)1, nx * ny * nz))) @@ -366,7 +366,7 @@ test_copy(int mode, size_t nx, size_t ny, size_t nz, size_t di, size_t dj, size_ HDsprintf(s, "Testing hyperslab copy %-11s %s", dim, sub); HDprintf("%-70s", s); - fflush(stdout); + HDfflush(stdout); /* * Allocate arrays @@ -575,7 +575,7 @@ test_multifill(size_t nx) hsize_t i, j; HDprintf("%-70s", "Testing multi-byte fill value"); - fflush(stdout); + HDfflush(stdout); /* Initialize the source and destination */ if (NULL == (src = (struct a_struct *)HDmalloc(nx * sizeof(*src)))) @@ -687,7 +687,7 @@ test_endian(size_t nx) hsize_t i, j; HDprintf("%-70s", "Testing endian conversion by stride"); - fflush(stdout); + HDfflush(stdout); /* Initialize arrays */ if (NULL == (src = (uint8_t *)HDmalloc(nx * 4))) @@ -773,7 +773,7 @@ test_transpose(size_t nx, size_t ny) HDsprintf(s, "Testing 2d transpose by stride %4lux%-lud", (unsigned long)nx, (unsigned long)ny); HDprintf("%-70s", s); - fflush(stdout); + HDfflush(stdout); /* Initialize */ if (NULL == (src = (int *)HDmalloc(nx * ny * sizeof(*src)))) @@ -872,7 +872,7 @@ test_sub_super(size_t nx, size_t ny) HDsprintf(s, "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)(2 * nx), (unsigned long)(2 * ny), (unsigned long)nx, (unsigned long)ny); HDprintf("%-70s", s); - fflush(stdout); + HDfflush(stdout); /* Initialize */ if (NULL == (full = (uint8_t *)HDmalloc(4 * nx * ny))) @@ -922,7 +922,7 @@ test_sub_super(size_t nx, size_t ny) HDsprintf(s, "Testing image sampling %4lux%-4lu to %4lux%-4lu ", (unsigned long)nx, (unsigned long)ny, (unsigned long)(2 * nx), (unsigned long)(2 * ny)); HDprintf("%-70s", s); - fflush(stdout); + HDfflush(stdout); /* Setup stride */ size[0] = nx; diff --git a/test/istore.c b/test/istore.c index a72743d..192e184 100644 --- a/test/istore.c +++ b/test/istore.c @@ -11,7 +11,7 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -/* Programmer: Robb Matzke +/* Programmer: Robb Matzke * Wednesday, October 15, 1997 * * Purpose: Tests various aspects of indexed raw data storage. @@ -375,7 +375,7 @@ test_extend(hid_t f, const char *prefix, size_t nx, size_t ny, size_t nz) HDfprintf(stderr, " Read failed: ctr=%lu\n", (unsigned long)ctr); goto error; } - if (HDmemcmp(buf, check, (size_t)nelmts)) { + if (HDmemcmp(buf, check, (size_t)nelmts) != 0) { H5_FAILED(); HDfprintf(stderr, " Read check failed: ctr=%lu\n", (unsigned long)ctr); HDfprintf(stderr, " Wrote:\n"); @@ -617,13 +617,13 @@ main(int argc, char *argv[]) else { int i; for (i = 1, size_of_test = 0; i < argc; i++) { - if (!strcmp(argv[i], "small")) { + if (!HDstrcmp(argv[i], "small")) { size_of_test |= TEST_SMALL; } - else if (!strcmp(argv[i], "medium")) { + else if (!HDstrcmp(argv[i], "medium")) { size_of_test |= TEST_MEDIUM; } - else if (!strcmp(argv[i], "large")) { + else if (!HDstrcmp(argv[i], "large")) { size_of_test |= TEST_LARGE; } else { diff --git a/test/links.c b/test/links.c index 51cadaf..2ac2e28 100644 --- a/test/links.c +++ b/test/links.c @@ -631,6 +631,8 @@ cklinks(hid_t fapl, hbool_t new_format) if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) FAIL_STACK_ERROR + //! [H5Otoken_cmp_snip] + /* Hard link */ if (H5Oget_info_by_name3(file, "d1", &oinfo1, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -641,6 +643,9 @@ cklinks(hid_t fapl, hbool_t new_format) HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__); TEST_ERROR } /* end if */ + + //! [H5Otoken_cmp_snip] + if (H5Otoken_cmp(file, &oinfo1.token, &oinfo2.token, &token_cmp) < 0) FAIL_STACK_ERROR if (token_cmp) { @@ -698,7 +703,7 @@ cklinks(hid_t fapl, hbool_t new_format) } /* end if */ if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if (HDstrcmp(linkval, "/d1")) { + if (HDstrcmp(linkval, "/d1") != 0) { H5_FAILED(); HDputs(" Soft link test failed. Wrong link value"); TEST_ERROR @@ -729,7 +734,7 @@ cklinks(hid_t fapl, hbool_t new_format) HDprintf(" %d: Can't retrieve link value\n", __LINE__); TEST_ERROR } /* end if */ - if (HDstrcmp(linkval, "foobar")) { + if (HDstrcmp(linkval, "foobar") != 0) { H5_FAILED(); HDputs(" Dangling link test failed. Wrong link value"); TEST_ERROR @@ -760,7 +765,7 @@ cklinks(hid_t fapl, hbool_t new_format) HDprintf(" %d: Can't retrieve link value\n", __LINE__); TEST_ERROR } /* end if */ - if (HDstrcmp(linkval, "/grp1/recursive")) { + if (HDstrcmp(linkval, "/grp1/recursive") != 0) { H5_FAILED(); HDputs(" Recursive link test failed. Wrong link value"); TEST_ERROR @@ -1059,7 +1064,7 @@ toomany(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/hard21")) + if (HDstrcmp(objname, "/hard21") != 0) TEST_ERROR /* Create object in hard-linked group */ @@ -1093,7 +1098,7 @@ toomany(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/soft16")) + if (HDstrcmp(objname, "/soft16") != 0) TEST_ERROR /* Create object using soft links */ @@ -1962,7 +1967,7 @@ test_deprec(hid_t fapl, hbool_t new_format) FAIL_STACK_ERROR if (H5Gget_comment(file_id, "group1", sizeof(tmpstr), tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp(tmpstr, "comment")) + if (HDstrcmp(tmpstr, "comment") != 0) TEST_ERROR /* Create links using H5Glink and H5Glink2 */ @@ -1978,7 +1983,7 @@ test_deprec(hid_t fapl, hbool_t new_format) /* Test getting the names for objects */ if (H5Gget_objname_by_idx(group1_id, (hsize_t)0, tmpstr, sizeof(tmpstr)) < 0) FAIL_STACK_ERROR - if (HDstrcmp(tmpstr, "link_to_group2")) + if (HDstrcmp(tmpstr, "link_to_group2") != 0) TEST_ERROR H5E_BEGIN_TRY { @@ -2015,7 +2020,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR - if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { + if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) { H5_FAILED(); HDputs(" Hard link test failed. Link seems not to point to the "); HDputs(" expected file location."); @@ -2028,7 +2033,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR - if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { + if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) { H5_FAILED(); HDputs(" Hard link test failed. Link seems not to point to the "); HDputs(" expected file location."); @@ -2045,7 +2050,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp("link_to_group1", tmpstr)) + if (HDstrcmp("link_to_group1", tmpstr) != 0) TEST_ERROR /* Test non-existing links with H5Gget_objinfo */ @@ -2066,7 +2071,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp("dangle", tmpstr)) + if (HDstrcmp("dangle", tmpstr) != 0) TEST_ERROR /* Test H5Gmove and H5Gmove2 */ @@ -2213,7 +2218,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format) } /* end if */ if (H5Lget_val(file, "grp1/soft", linkval, sizeof linkval, H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if (HDstrcmp(linkval, "/d1")) { + if (HDstrcmp(linkval, "/d1") != 0) { H5_FAILED(); HDputs(" Soft link test failed. Wrong link value"); TEST_ERROR @@ -2244,7 +2249,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format) HDprintf(" %d: Can't retrieve link value\n", __LINE__); TEST_ERROR } /* end if */ - if (HDstrcmp(linkval, "foobar")) { + if (HDstrcmp(linkval, "foobar") != 0) { H5_FAILED(); HDputs(" Dangling link test failed. Wrong link value"); TEST_ERROR @@ -2275,7 +2280,7 @@ cklinks_deprec(hid_t fapl, hbool_t new_format) HDprintf(" %d: Can't retrieve link value\n", __LINE__); TEST_ERROR } /* end if */ - if (HDstrcmp(linkval, "/grp1/recursive")) { + if (HDstrcmp(linkval, "/grp1/recursive") != 0) { H5_FAILED(); HDputs(" Recursive link test failed. Wrong link value"); TEST_ERROR @@ -2812,12 +2817,12 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format) TEST_ERROR if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0) TEST_ERROR - if (HDstrcmp(file, filename1)) { + if (HDstrcmp(file, filename1) != 0) { H5_FAILED(); HDputs(" External link file name incorrect"); goto error; } - if (HDstrcmp(path, "/")) { + if (HDstrcmp(path, "/") != 0) { H5_FAILED(); HDputs(" External link path incorrect"); goto error; @@ -2840,12 +2845,12 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format) TEST_ERROR if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0) TEST_ERROR - if (HDstrcmp(file, filename1)) { + if (HDstrcmp(file, filename1) != 0) { H5_FAILED(); HDputs(" External link file name incorrect"); goto error; } - if (HDstrcmp(path, "/")) { + if (HDstrcmp(path, "/") != 0) { H5_FAILED(); HDputs(" External link path incorrect"); goto error; @@ -2864,7 +2869,7 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/")) + if (HDstrcmp(objname, "/") != 0) TEST_ERROR /* Create object in external file */ @@ -2909,11 +2914,11 @@ external_link_root_deprec(hid_t fapl, hbool_t new_format) /* Check names */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/new_group")) + if (HDstrcmp(objname, "/new_group") != 0) TEST_ERROR if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/newer_group")) + if (HDstrcmp(objname, "/newer_group") != 0) TEST_ERROR /* Close opened objects */ @@ -3061,9 +3066,9 @@ external_link_query_deprec(hid_t fapl, hbool_t new_format) TEST_ERROR /* Compare the file and object names */ - if (HDstrcmp(file_name, filename2)) + if (HDstrcmp(file_name, filename2) != 0) TEST_ERROR - if (HDstrcmp(object_name, "/dst")) + if (HDstrcmp(object_name, "/dst") != 0) TEST_ERROR /* Query information about object that external link points to */ @@ -3257,7 +3262,7 @@ external_link_closing_deprec(hid_t fapl, hbool_t new_format) FAIL_STACK_ERROR if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if (HDstrcmp(buf, "comment")) + if (HDstrcmp(buf, "comment") != 0) TEST_ERROR /* Test H5*open */ @@ -3674,7 +3679,7 @@ ud_hard_links_deprec(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/group")) + if (HDstrcmp(objname, "/group") != 0) TEST_ERROR /* Create object in group */ @@ -3694,7 +3699,7 @@ ud_hard_links_deprec(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/group/new_group")) + if (HDstrcmp(objname, "/group/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -3857,7 +3862,7 @@ ud_link_reregister_deprec(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/" REREG_TARGET_NAME)) + if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0) TEST_ERROR /* Create object in group */ @@ -3877,7 +3882,7 @@ ud_link_reregister_deprec(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/rereg_target/new_group")) + if (HDstrcmp(objname, "/rereg_target/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -4221,7 +4226,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/soft17")) + if (HDstrcmp(objname, "/soft17") != 0) TEST_ERROR /* Create group using soft link */ @@ -4265,7 +4270,7 @@ lapl_nlinks_deprec(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/soft4")) + if (HDstrcmp(objname, "/soft4") != 0) TEST_ERROR /* Test other functions that should use a LAPL */ @@ -4880,7 +4885,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -4889,7 +4894,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Don't test "native" order if there is no creation order index, since @@ -4919,7 +4924,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -4928,7 +4933,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR } /* end if */ @@ -4953,7 +4958,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -4962,7 +4967,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Verify the link information for first link, in increasing link name order */ @@ -4985,7 +4990,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -4994,7 +4999,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Don't test "native" order queries on link name order, since there's not @@ -5021,7 +5026,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -5030,7 +5035,7 @@ link_info_by_idx_check_deprec(hid_t group_id, const char *linkname, hsize_t n, h if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Success */ @@ -5377,7 +5382,7 @@ link_info_by_idx_old_deprec(hid_t fapl) if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end else */ @@ -5385,7 +5390,7 @@ link_info_by_idx_old_deprec(hid_t fapl) if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR /* Verify link information (in native order - native is increasing) */ @@ -5400,7 +5405,7 @@ link_info_by_idx_old_deprec(hid_t fapl) if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end else */ @@ -5408,7 +5413,7 @@ link_info_by_idx_old_deprec(hid_t fapl) if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR /* Make link name for decreasing order queries */ @@ -5429,7 +5434,7 @@ link_info_by_idx_old_deprec(hid_t fapl) if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end else */ @@ -5437,7 +5442,7 @@ link_info_by_idx_old_deprec(hid_t fapl) if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -5663,7 +5668,7 @@ delete_by_idx_deprec(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -5737,7 +5742,7 @@ delete_by_idx_deprec(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -5816,7 +5821,7 @@ delete_by_idx_deprec(hid_t fapl) else HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - ((u * 2) + 2))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -5850,7 +5855,7 @@ delete_by_idx_deprec(hid_t fapl) else HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - ((u * 2) + 4))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -6017,7 +6022,7 @@ delete_by_idx_old_deprec(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -6091,7 +6096,7 @@ delete_by_idx_old_deprec(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -6125,7 +6130,7 @@ delete_by_idx_old_deprec(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3)); else HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -6207,7 +6212,7 @@ link_iterate_deprec_cb(hid_t group_id, const char *link_name, const H5L_info1_t /* Verify name of link */ HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder); - if (HDstrcmp(link_name, objname)) + if (HDstrcmp(link_name, objname) != 0) return H5_ITER_ERROR; /* Check if we've visited this link before */ @@ -6707,7 +6712,7 @@ link_iterate_old_deprec_cb(hid_t group_id, const char *link_name, const H5L_info /* Verify name of link */ HDsnprintf(objname, sizeof(objname), "filler %02u", (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped))); - if (HDstrcmp(link_name, objname)) + if (HDstrcmp(link_name, objname) != 0) return H5_ITER_ERROR; /* Check if we've visited this link before */ @@ -7130,12 +7135,12 @@ external_link_root(hid_t fapl, hbool_t new_format) TEST_ERROR if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0) TEST_ERROR - if (HDstrcmp(file, filename1)) { + if (HDstrcmp(file, filename1) != 0) { H5_FAILED(); HDputs(" External link file name incorrect"); goto error; } - if (HDstrcmp(path, "/")) { + if (HDstrcmp(path, "/") != 0) { H5_FAILED(); HDputs(" External link path incorrect"); goto error; @@ -7158,12 +7163,12 @@ external_link_root(hid_t fapl, hbool_t new_format) TEST_ERROR if (H5Lunpack_elink_val(objname, linfo.u.val_size, NULL, &file, &path) < 0) TEST_ERROR - if (HDstrcmp(file, filename1)) { + if (HDstrcmp(file, filename1) != 0) { H5_FAILED(); HDputs(" External link file name incorrect"); goto error; } - if (HDstrcmp(path, "/")) { + if (HDstrcmp(path, "/") != 0) { H5_FAILED(); HDputs(" External link path incorrect"); goto error; @@ -7182,7 +7187,7 @@ external_link_root(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/")) + if (HDstrcmp(objname, "/") != 0) TEST_ERROR /* Create object in external file */ @@ -7227,11 +7232,11 @@ external_link_root(hid_t fapl, hbool_t new_format) /* Check names */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/new_group")) + if (HDstrcmp(objname, "/new_group") != 0) TEST_ERROR if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/newer_group")) + if (HDstrcmp(objname, "/newer_group") != 0) TEST_ERROR /* Close opened objects */ @@ -7353,7 +7358,7 @@ external_link_path(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/B/C")) + if (HDstrcmp(objname, "/A/B/C") != 0) TEST_ERROR /* Create object in external file */ @@ -7383,7 +7388,7 @@ external_link_path(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/B/C/new_group")) + if (HDstrcmp(objname, "/A/B/C/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -7525,7 +7530,7 @@ external_link_mult(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/B/C")) + if (HDstrcmp(objname, "/A/B/C") != 0) TEST_ERROR /* Create object in external file */ @@ -7555,7 +7560,7 @@ external_link_mult(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/B/C/new_group")) + if (HDstrcmp(objname, "/A/B/C/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -7671,7 +7676,7 @@ external_link_self(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/X")) + if (HDstrcmp(objname, "/X") != 0) TEST_ERROR /* Create object through external link */ @@ -7693,7 +7698,7 @@ external_link_self(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/X/new_group")) + if (HDstrcmp(objname, "/X/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -7878,7 +7883,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/final")) + if (HDstrcmp(objname, "/final") != 0) TEST_ERROR /* Create object in external file */ @@ -7908,7 +7913,7 @@ external_link_pingpong(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/final/new_group")) + if (HDstrcmp(objname, "/final/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -8070,7 +8075,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/final")) + if (HDstrcmp(objname, "/final") != 0) TEST_ERROR /* Create object in external file */ @@ -9841,13 +9846,13 @@ external_set_elink_cb_cb(const char *parent_file, const char *parent_group, cons set_elink_cb_t *op_data = (set_elink_cb_t *)_op_data; /* Verify file and object names are correct */ - if (HDstrcmp(parent_file, op_data->parent_file)) + if (HDstrcmp(parent_file, op_data->parent_file) != 0) return FAIL; - if (HDstrcmp(parent_group, "/group1")) + if (HDstrcmp(parent_group, "/group1") != 0) return FAIL; - if (HDstrcmp(target_file, op_data->target_file)) + if (HDstrcmp(target_file, op_data->target_file) != 0) return FAIL; - if (HDstrcmp(target_obj, "/")) + if (HDstrcmp(target_obj, "/") != 0) return FAIL; /* Set flags to be read-write */ @@ -11110,9 +11115,9 @@ external_link_query(hid_t fapl, hbool_t new_format) TEST_ERROR /* Compare the file and object names */ - if (HDstrcmp(file_name, filename2)) + if (HDstrcmp(file_name, filename2) != 0) TEST_ERROR - if (HDstrcmp(object_name, "/dst")) + if (HDstrcmp(object_name, "/dst") != 0) TEST_ERROR /* Query information about object that external link points to */ @@ -11509,7 +11514,7 @@ external_link_move(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/dst")) + if (HDstrcmp(objname, "/dst") != 0) TEST_ERROR /* Create object in external file */ @@ -11569,7 +11574,7 @@ external_link_move(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/dst")) + if (HDstrcmp(objname, "/dst") != 0) TEST_ERROR /* Create object in external file */ @@ -11616,7 +11621,7 @@ external_link_move(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/dst")) + if (HDstrcmp(objname, "/dst") != 0) TEST_ERROR /* Move external link back to original location */ @@ -11626,7 +11631,7 @@ external_link_move(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) FAIL_STACK_ERROR - if (HDstrcmp(objname, "/dst")) + if (HDstrcmp(objname, "/dst") != 0) TEST_ERROR /* Create object in external file */ @@ -11800,7 +11805,7 @@ external_link_ride(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/dst")) + if (HDstrcmp(objname, "/dst") != 0) TEST_ERROR /* Create object in external file */ @@ -11849,7 +11854,7 @@ external_link_ride(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/dst")) + if (HDstrcmp(objname, "/dst") != 0) TEST_ERROR /* Create object in external file */ @@ -12042,7 +12047,7 @@ external_link_closing(hid_t fapl, hbool_t new_format) FAIL_STACK_ERROR if (H5Oget_comment_by_name(fid1, "elink/elink/elink/group1_moved", buf, sizeof(buf), H5P_DEFAULT) < 0) FAIL_STACK_ERROR - if (HDstrcmp(buf, "comment")) + if (HDstrcmp(buf, "comment") != 0) TEST_ERROR /* Test H5*open */ @@ -12385,7 +12390,7 @@ external_link_strong(hid_t fapl, hbool_t new_format) FAIL_STACK_ERROR if (H5Iget_name(gid2, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/A/B/C")) + if (HDstrcmp(objname, "/A/B/C") != 0) TEST_ERROR if (H5Gclose(gid2) < 0) TEST_ERROR @@ -13953,7 +13958,7 @@ ud_hard_links(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/group")) + if (HDstrcmp(objname, "/group") != 0) TEST_ERROR /* Create object in group */ @@ -13973,7 +13978,7 @@ ud_hard_links(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/group/new_group")) + if (HDstrcmp(objname, "/group/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -14164,7 +14169,7 @@ ud_link_reregister(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/" REREG_TARGET_NAME)) + if (HDstrcmp(objname, "/" REREG_TARGET_NAME) != 0) TEST_ERROR /* Create object in group */ @@ -14184,7 +14189,7 @@ ud_link_reregister(hid_t fapl) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/rereg_target/new_group")) + if (HDstrcmp(objname, "/rereg_target/new_group") != 0) TEST_ERROR /* Close opened object */ @@ -14273,9 +14278,9 @@ UD_cb_create(const char *link_name, hid_t loc_group, const void *udata, size_t u if (lcpl_id < 0) TEST_ERROR - if (HDstrcmp(link_name, UD_CB_LINK_NAME) && strcmp(link_name, NEW_UD_CB_LINK_NAME)) + if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0) TEST_ERROR - if (HDstrcmp((const char *)udata, UD_CB_TARGET)) + if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0) TEST_ERROR if (udata_size != UD_CB_TARGET_LEN) TEST_ERROR @@ -14300,9 +14305,9 @@ UD_cb_traverse(const char *link_name, hid_t cur_group, const void *udata, size_t if (udata_size > 0 && !udata) TEST_ERROR - if (HDstrcmp(link_name, UD_CB_LINK_NAME) && strcmp(link_name, NEW_UD_CB_LINK_NAME)) + if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0) TEST_ERROR - if (HDstrcmp((const char *)udata, UD_CB_TARGET)) + if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0) TEST_ERROR if (udata_size != UD_CB_TARGET_LEN) TEST_ERROR @@ -14327,9 +14332,9 @@ UD_cb_move(const char *new_name, hid_t new_loc, const void *udata, size_t udata_ if (udata_size > 0 && !udata) TEST_ERROR - if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME)) + if (HDstrcmp(new_name, NEW_UD_CB_LINK_NAME) != 0) TEST_ERROR - if (HDstrcmp((const char *)udata, UD_CB_TARGET)) + if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0) TEST_ERROR if (udata_size != UD_CB_TARGET_LEN) TEST_ERROR @@ -14351,9 +14356,9 @@ UD_cb_delete(const char *link_name, hid_t file, const void *udata, size_t udata_ if (udata_size > 0 && !udata) TEST_ERROR - if (HDstrcmp(link_name, UD_CB_LINK_NAME) && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME)) + if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0 && HDstrcmp(link_name, NEW_UD_CB_LINK_NAME) != 0) TEST_ERROR - if (HDstrcmp((const char *)udata, UD_CB_TARGET)) + if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0) TEST_ERROR if (udata_size != UD_CB_TARGET_LEN) TEST_ERROR @@ -14373,9 +14378,9 @@ UD_cb_query(const char *link_name, const void *udata, size_t udata_size, void *b if (udata_size > 0 && !udata) TEST_ERROR - if (HDstrcmp(link_name, UD_CB_LINK_NAME)) + if (HDstrcmp(link_name, UD_CB_LINK_NAME) != 0) TEST_ERROR - if (HDstrcmp((const char *)udata, UD_CB_TARGET)) + if (HDstrcmp((const char *)udata, UD_CB_TARGET) != 0) TEST_ERROR if (udata_size != UD_CB_TARGET_LEN) TEST_ERROR @@ -14672,7 +14677,7 @@ lapl_udata(hid_t fapl, hbool_t new_format) TEST_ERROR /* Now use the same ud link to access group_b */ - strcpy(group_b_name, "group_b"); + HDstrcpy(group_b_name, "group_b"); if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0) TEST_ERROR @@ -14986,7 +14991,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format) H5E_END_TRY; /* Create a user-defined link to the group. */ - strcpy(group_name, "/group"); + HDstrcpy(group_name, "/group"); if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR @@ -15207,7 +15212,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/soft17")) + if (HDstrcmp(objname, "/soft17") != 0) TEST_ERROR /* Create group using soft link */ @@ -15251,7 +15256,7 @@ lapl_nlinks(hid_t fapl, hbool_t new_format) /* Check name */ if (H5Iget_name(gid, objname, (size_t)NAME_BUF_SIZE) < 0) TEST_ERROR - if (HDstrcmp(objname, "/soft4")) + if (HDstrcmp(objname, "/soft4") != 0) TEST_ERROR /* Test other functions that should use a LAPL */ @@ -15711,7 +15716,7 @@ visit_link_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5L_info2_t lvisit_ud_t *op_data = (lvisit_ud_t *)_op_data; /* Check for correct link information */ - if (HDstrcmp(op_data->info[op_data->idx].path, name)) + if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0) return (H5_ITER_ERROR); if (op_data->info[op_data->idx].type != linfo->type) return (H5_ITER_ERROR); @@ -15902,7 +15907,7 @@ visit_obj_cb(hid_t H5_ATTR_UNUSED group_id, const char *name, const H5O_info2_t ovisit_ud_t *op_data = (ovisit_ud_t *)_op_data; /* Check for correct object information */ - if (HDstrcmp(op_data->info[op_data->idx].path, name)) + if (HDstrcmp(op_data->info[op_data->idx].path, name) != 0) return (H5_ITER_ERROR); if (op_data->info[op_data->idx].type != oinfo->type) return (H5_ITER_ERROR); @@ -15938,12 +15943,16 @@ obj_visit(hid_t fapl, hbool_t new_format) if ((fid = build_visit_file(fapl)) < 0) TEST_ERROR + //! [H5Ovisit3_snip] + /* Visit all the objects reachable from the root group (with file ID) */ udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; if (H5Ovisit3(fid, H5_INDEX_NAME, H5_ITER_INC, visit_obj_cb, &udata, H5O_INFO_BASIC) < 0) FAIL_STACK_ERROR + //! [H5Ovisit3_snip] + /* Visit all the objects reachable from the root group (with group ID) */ if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -16015,6 +16024,8 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format) if ((fid = build_visit_file(fapl)) < 0) TEST_ERROR + //! [H5Ovisit_by_name3_snip] + /* Visit all the objects reachable from the root group (with file ID) */ udata.idx = 0; udata.info = new_format ? ovisit0_new : ovisit0_old; @@ -16022,6 +16033,8 @@ obj_visit_by_name(hid_t fapl, hbool_t new_format) H5P_DEFAULT) < 0) FAIL_STACK_ERROR + //! [H5Ovisit_by_name3_snip] + /* Visit all the objects reachable from the root group (with group ID) */ if ((gid = H5Gopen2(fid, "/", H5P_DEFAULT)) < 0) FAIL_STACK_ERROR @@ -16431,13 +16444,13 @@ link_filters(hid_t fapl, hbool_t new_format) if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out, (size_t)24, name_out, &filter_config_out) < 0) TEST_ERROR - if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) || + if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 || filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) TEST_ERROR if (H5Pget_filter2(gcpl2, (unsigned)(nfilters - 1), &flags_out, &cd_nelmts, &cd_value_out, (size_t)24, name_out, &filter_config_out) < 0) TEST_ERROR - if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) || + if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 || filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) TEST_ERROR @@ -16448,7 +16461,7 @@ link_filters(hid_t fapl, hbool_t new_format) if (H5Pget_filter_by_id2(gcpl2, H5Z_FILTER_RESERVED + 42, &flags_out, &cd_nelmts, &cd_value_out, (size_t)24, name_out, &filter_config_out) < 0) TEST_ERROR - if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) || + if (flags_out != 0 || cd_value_out != cd_value || HDstrcmp(filter_class.name, name_out) != 0 || filter_config_out != (H5Z_FILTER_CONFIG_ENCODE_ENABLED | H5Z_FILTER_CONFIG_DECODE_ENABLED)) TEST_ERROR @@ -17896,7 +17909,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -17905,7 +17918,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Don't test "native" order if there is no creation order index, since @@ -17935,7 +17948,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -17944,7 +17957,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR } /* end if */ @@ -17969,7 +17982,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -17978,7 +17991,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Verify the link information for first link, in increasing link name order */ @@ -18001,7 +18014,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -18010,7 +18023,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Don't test "native" order queries on link name order, since there's not @@ -18037,7 +18050,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end if */ @@ -18046,7 +18059,7 @@ link_info_by_idx_check(hid_t group_id, const char *linkname, hsize_t n, hbool_t if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(linkname, tmpname)) + if (HDstrcmp(linkname, tmpname) != 0) TEST_ERROR /* Success */ @@ -18403,7 +18416,7 @@ link_info_by_idx_old(hid_t fapl) if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end else */ @@ -18411,7 +18424,7 @@ link_info_by_idx_old(hid_t fapl) if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_INC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR /* Verify link information (in native order - native is increasing) */ @@ -18428,7 +18441,7 @@ link_info_by_idx_old(hid_t fapl) if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end else */ @@ -18436,7 +18449,7 @@ link_info_by_idx_old(hid_t fapl) if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_NATIVE, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR /* Make link name for decreasing order queries */ @@ -18459,7 +18472,7 @@ link_info_by_idx_old(hid_t fapl) if (H5Lget_val_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpval, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(valname, tmpval)) + if (HDstrcmp(valname, tmpval) != 0) TEST_ERROR } /* end else */ @@ -18467,7 +18480,7 @@ link_info_by_idx_old(hid_t fapl) if (H5Lget_name_by_idx(group_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)u, tmpname, (size_t)NAME_BUF_SIZE, H5P_DEFAULT) < 0) TEST_ERROR - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -18691,7 +18704,7 @@ delete_by_idx(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", (max_compact - (u + 2))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -18765,7 +18778,7 @@ delete_by_idx(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - (u + 2))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -18844,7 +18857,7 @@ delete_by_idx(hid_t fapl) else HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - ((u * 2) + 2))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -18878,7 +18891,7 @@ delete_by_idx(hid_t fapl) else HDsnprintf(objname, sizeof(objname), "filler %02u", ((max_compact * 2) - ((u * 2) + 4))); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -19059,7 +19072,7 @@ delete_by_idx_old(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", (u + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -19138,7 +19151,7 @@ delete_by_idx_old(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 1)); else HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -19176,7 +19189,7 @@ delete_by_idx_old(hid_t fapl) HDsnprintf(objname, sizeof(objname), "filler %02u", ((u * 2) + 3)); else HDsnprintf(objname, sizeof(objname), "filler %02u", dec_u); - if (HDstrcmp(objname, tmpname)) + if (HDstrcmp(objname, tmpname) != 0) TEST_ERROR } /* end for */ @@ -19262,7 +19275,7 @@ link_iterate_cb(hid_t group_id, const char *link_name, const H5L_info2_t *info, /* Verify name of link */ HDsnprintf(objname, sizeof(objname), "filler %02u", (unsigned)my_info.corder); - if (HDstrcmp(link_name, objname)) + if (HDstrcmp(link_name, objname) != 0) return H5_ITER_ERROR; /* Check if we've visited this link before */ @@ -19777,7 +19790,7 @@ link_iterate_old_cb(hid_t group_id, const char *link_name, const H5L_info2_t *in /* Verify name of link */ HDsnprintf(objname, sizeof(objname), "filler %02u", (info ? (unsigned)op_data->curr : (unsigned)((op_data->ncalled - 1) + op_data->nskipped))); - if (HDstrcmp(link_name, objname)) + if (HDstrcmp(link_name, objname) != 0) return H5_ITER_ERROR; /* Check if we've visited this link before */ diff --git a/test/swmr_common.h b/test/swmr_common.h index 249ff81..7e0ee23 100644 --- a/test/swmr_common.h +++ b/test/swmr_common.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _SWMR_COMMON_H -#define _SWMR_COMMON_H +#ifndef SWMR_COMMON_H +#define SWMR_COMMON_H /***********/ /* Headers */ @@ -75,4 +75,4 @@ H5TEST_DLL int print_metadata_retries_info(hid_t fid); } #endif -#endif /* _SWMR_COMMON_H */ +#endif /* SWMR_COMMON_H */ diff --git a/testpar/testphdf5.h b/testpar/testphdf5.h index 9aa51c1..d1469df 100644 --- a/testpar/testphdf5.h +++ b/testpar/testphdf5.h @@ -98,9 +98,8 @@ enum H5TEST_COLL_CHUNK_API { #define MSPACE1_DIM 27000 /* Dataset size in memory */ #define FSPACE_RANK 2 /* Dataset rank as it is stored in the file */ #define FSPACE_DIM1 9 /* Dimension sizes of the dataset as it is stored in the file */ -#define FSPACE_DIM2 \ - 3600 /* We will read dataset back from the file to the dataset \ - in memory with these dataspace parameters. */ +#define FSPACE_DIM2 3600 +/* We will read dataset back from the file to the dataset in memory with these dataspace parameters. */ #define MSPACE_RANK 2 #define MSPACE_DIM1 9 #define MSPACE_DIM2 3600 diff --git a/tools/lib/h5diff.h b/tools/lib/h5diff.h index 9fcf821..7b41538 100644 --- a/tools/lib/h5diff.h +++ b/tools/lib/h5diff.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5DIFF_H__ -#define H5DIFF_H__ +#ifndef H5DIFF_H +#define H5DIFF_H #include "hdf5.h" #include "h5tools.h" @@ -160,4 +160,4 @@ int print_objname(diff_opt_t *opts, hsize_t nfound); void do_print_objname(const char *OBJ, const char *path1, const char *path2, diff_opt_t *opts); void do_print_attrname(const char *attr, const char *path1, const char *path2); -#endif /* H5DIFF_H__ */ +#endif /* H5DIFF_H */ diff --git a/tools/lib/h5tools.h b/tools/lib/h5tools.h index d807603..f9aabbf 100644 --- a/tools/lib/h5tools.h +++ b/tools/lib/h5tools.h @@ -12,13 +12,13 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Robb Matzke + * Programmer: Robb Matzke * Thursday, July 23, 1998 * * Purpose: Support functions for the various tools. */ -#ifndef H5TOOLS_H__ -#define H5TOOLS_H__ +#ifndef H5TOOLS_H +#define H5TOOLS_H #include "hdf5.h" #include "h5tools_error.h" @@ -712,4 +712,4 @@ H5TOOLS_DLL hbool_t h5tools_render_region_element(FILE *stream, const h5tool_for } #endif -#endif /* H5TOOLS_H__ */ +#endif /* H5TOOLS_H */ diff --git a/tools/lib/h5tools_dump.h b/tools/lib/h5tools_dump.h index d49187d..901b38e 100644 --- a/tools/lib/h5tools_dump.h +++ b/tools/lib/h5tools_dump.h @@ -14,8 +14,8 @@ /* * Purpose: Support h5dump functions for the various tools. */ -#ifndef H5TOOLS_DUMP_H__ -#define H5TOOLS_DUMP_H__ +#ifndef H5TOOLS_DUMP_H +#define H5TOOLS_DUMP_H #include "h5tools_utils.h" @@ -94,4 +94,4 @@ H5TOOLS_DLL void h5tools_print_packed_bits(h5tools_str_t *buffer /*in,out*/, hid } #endif -#endif /* H5TOOLS_DUMP_H__ */ +#endif /* H5TOOLS_DUMP_H */ diff --git a/tools/lib/h5tools_error.h b/tools/lib/h5tools_error.h index b8e5339..8fd33bb 100644 --- a/tools/lib/h5tools_error.h +++ b/tools/lib/h5tools_error.h @@ -14,8 +14,8 @@ /* * Header file for error values, etc. */ -#ifndef H5TOOLS_ERROR_H_ -#define H5TOOLS_ERROR_H_ +#ifndef H5TOOLS_ERROR_H +#define H5TOOLS_ERROR_H #include "H5Epublic.h" #include "H5Eprivate.h" /* Error handling */ @@ -250,4 +250,4 @@ H5TOOLS_DLLVAR hid_t H5E_tools_min_dbg_id_g; H5_LEAVE(ret_val) \ } while (0) -#endif /* H5TOOLS_ERROR_H_ */ +#endif /* H5TOOLS_ERROR_H */ diff --git a/tools/lib/h5tools_ref.h b/tools/lib/h5tools_ref.h index b4819ef..9feaeb1 100644 --- a/tools/lib/h5tools_ref.h +++ b/tools/lib/h5tools_ref.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5TOOLS_REF_H__ -#define H5TOOLS_REF_H__ +#ifndef H5TOOLS_REF_H +#define H5TOOLS_REF_H #include "hdf5.h" diff --git a/tools/lib/h5tools_str.h b/tools/lib/h5tools_str.h index df1f64f..c207a83 100644 --- a/tools/lib/h5tools_str.h +++ b/tools/lib/h5tools_str.h @@ -12,11 +12,11 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Bill Wendling + * Programmer: Bill Wendling * Monday, 19. February 2001 */ -#ifndef H5TOOLS_STR_H__ -#define H5TOOLS_STR_H__ +#ifndef H5TOOLS_STR_H +#define H5TOOLS_STR_H typedef struct h5tools_str_t { char * s; /*allocate string */ @@ -46,4 +46,4 @@ H5TOOLS_DLL char *h5tools_str_sprint(h5tools_str_t *str, const h5tool_format_t * hid_t type, void *vp, h5tools_context_t *ctx); H5TOOLS_DLL char *h5tools_str_replace(const char *string, const char *substr, const char *replacement); -#endif /* H5TOOLS_STR_H__ */ +#endif /* H5TOOLS_STR_H */ diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 460dbba..307ce20 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -12,13 +12,13 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ /* - * Programmer: Bill Wendling + * Programmer: Bill Wendling * Tuesday, 6. March 2001 * * Purpose: Support functions for the various tools. */ -#ifndef H5TOOLS_UTILS_H__ -#define H5TOOLS_UTILS_H__ +#ifndef H5TOOLS_UTILS_H +#define H5TOOLS_UTILS_H #include "hdf5.h" @@ -191,4 +191,4 @@ H5TOOLS_DLL herr_t h5tools_parse_hdfs_fapl_tuple(const char *tuple_str, int deli } #endif -#endif /* H5TOOLS_UTILS_H__ */ +#endif /* H5TOOLS_UTILS_H */ diff --git a/tools/lib/h5trav.h b/tools/lib/h5trav.h index c45b07a..c7b9db7 100644 --- a/tools/lib/h5trav.h +++ b/tools/lib/h5trav.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef H5TRAV_H__ -#define H5TRAV_H__ +#ifndef H5TRAV_H +#define H5TRAV_H #include "hdf5.h" @@ -189,4 +189,4 @@ H5TOOLS_DLL void trav_table_free(trav_table_t *table); H5TOOLS_DLL void trav_table_addflags(unsigned *flags, char *objname, h5trav_type_t type, trav_table_t *table); -#endif /* H5TRAV_H__ */ +#endif /* H5TRAV_H */ diff --git a/tools/lib/io_timer.h b/tools/lib/io_timer.h index 96ea05e..0269b93 100644 --- a/tools/lib/io_timer.h +++ b/tools/lib/io_timer.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef IO_TIMER__ -#define IO_TIMER__ +#ifndef IO_TIMER +#define IO_TIMER #include "hdf5.h" @@ -88,4 +88,4 @@ H5TOOLS_DLL double io_time_get(io_time_t *pt, timer_type t); } #endif /* __cplusplus */ -#endif /* IO_TIMER__ */ +#endif /* IO_TIMER */ diff --git a/tools/lib/ph5diff.h b/tools/lib/ph5diff.h index 8e884dd..7dce495 100644 --- a/tools/lib/ph5diff.h +++ b/tools/lib/ph5diff.h @@ -11,8 +11,8 @@ * help@hdfgroup.org. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#ifndef _PH5DIFF_H__ -#define _PH5DIFF_H__ +#ifndef PH5DIFF_H +#define PH5DIFF_H /* Send from manager to workers */ #define MPI_TAG_ARGS 1 @@ -40,4 +40,4 @@ struct diffs_found { int not_cmp; }; -#endif /* _PH5DIFF_H__ */ +#endif /* PH5DIFF_H */ -- cgit v0.12