From 02039e0a91cf1baae46d52a77c521fc6357b7c90 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Fri, 6 Apr 2018 00:11:18 -0700 Subject: Minor warning cleanup while working on VOL issues. --- src/H5B2dbg.c | 4 ++-- src/H5F.c | 2 +- test/objcopy.c | 1 - test/ohdr.c | 20 ++++++++++---------- test/tfile.c | 6 ++---- 5 files changed, 15 insertions(+), 18 deletions(-) diff --git a/src/H5B2dbg.c b/src/H5B2dbg.c index dc079f1..c4f56e5 100644 --- a/src/H5B2dbg.c +++ b/src/H5B2dbg.c @@ -218,7 +218,7 @@ H5B2__int_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, */ H5_CHECK_OVERFLOW(depth, unsigned, uint16_t); node_ptr.addr = addr; - H5_CHECKED_ASSIGN(node_ptr.node_nrec, unsigned, nrec, uint16_t) + H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned) if(NULL == (internal = H5B2__protect_internal(hdr, NULL, &node_ptr, (uint16_t)depth, FALSE, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTLOAD, FAIL, "unable to load B-tree internal node") @@ -330,7 +330,7 @@ H5B2__leaf_debug(H5F_t *f, haddr_t addr, FILE *stream, int indent, int fwidth, */ H5_CHECK_OVERFLOW(nrec, unsigned, uint16_t); node_ptr.addr = addr; - H5_CHECKED_ASSIGN(node_ptr.node_nrec, unsigned, nrec, uint16_t) + H5_CHECKED_ASSIGN(node_ptr.node_nrec, uint16_t, nrec, unsigned) if(NULL == (leaf = H5B2__protect_leaf(hdr, NULL, &node_ptr, FALSE, H5AC__READ_ONLY_FLAG))) HGOTO_ERROR(H5E_BTREE, H5E_CANTPROTECT, FAIL, "unable to protect B-tree leaf node") diff --git a/src/H5F.c b/src/H5F.c index 8023a04..6d62c08 100644 --- a/src/H5F.c +++ b/src/H5F.c @@ -1344,7 +1344,7 @@ H5Fstart_swmr_write(hid_t file_id) /* Call the internal routine */ if(H5F__start_swmr_write(file) < 0) - HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "unable to convert file format") + HGOTO_ERROR(H5E_FILE, H5E_CANTCONVERT, FAIL, "unable to convert file format") done: FUNC_LEAVE_API(ret_value) diff --git a/test/objcopy.c b/test/objcopy.c index e88d508..3fbb7b8 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -145,7 +145,6 @@ const char *FILENAME[] = { #define NAME_LINK_EXTERN_DANGLE "/g_links/external_link_to_nowhere" #define NAME_LINK_EXTERN_DANGLE2 "/g_links2/external_link_to_nowhere" #define NAME_OLD_FORMAT "/dset1" -#define NAME_DSET_NULL "DSET_NULL" #define NAME_BUF_SIZE 1024 #define ATTR_NAME_LEN 80 diff --git a/test/ohdr.c b/test/ohdr.c index d0f6966..e91c6a8 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -735,40 +735,40 @@ error: #define STR_EARLIEST "earliest" #define STR_V18 "v18" #define STR_LATEST "latest" -static char *version_string(H5F_libver_t libver) +static char * +version_string(H5F_libver_t libver) { char *str = NULL; str = (char *) HDmalloc(20); - if (str == NULL) - { - fprintf(stderr, "Allocation failed\n"); - exit(1); + if (str == NULL) { + HDfprintf(stderr, "Allocation failed\n"); + HDexit(1); } switch(libver) { case H5F_LIBVER_EARLIEST: - strcpy(str, STR_EARLIEST); + HDstrcpy(str, STR_EARLIEST); break; case H5F_LIBVER_V18: - strcpy(str, STR_V18); + HDstrcpy(str, STR_V18); break; case H5F_LIBVER_V110: HDassert(H5F_LIBVER_LATEST == H5F_LIBVER_V110); - strcpy(str, STR_LATEST); + HDstrcpy(str, STR_LATEST); break; case H5F_LIBVER_ERROR: case H5F_LIBVER_NBOUNDS: default: - sprintf(str, "%ld", (long)libver); + HDsprintf(str, "%ld", (long)libver); break; } /* end switch */ /* Return the formed version bound string */ - return(str); + return str; } /* end of version_string */ diff --git a/test/tfile.c b/test/tfile.c index 80c1e11..677fd06 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -181,8 +181,6 @@ static void test_libver_bounds_datatype(hid_t fapl); static void test_libver_bounds_datatype_check(hid_t fapl, hid_t tid); static void test_libver_bounds_attributes(hid_t fapl); -#define FILE8 "tfile8.h5" /* Test file */ - #define DSET_NULL "DSET_NULL" #define DSET "DSET" #define DSETA "DSETA" @@ -6935,7 +6933,7 @@ test_libver_macros2(void) ** ****************************************************************/ static void -test_incr_filesize(const char *env_h5_drvr) +test_incr_filesize(void) { hid_t fid; /* File opened with read-write permission */ h5_stat_size_t filesize; /* Size of file when empty */ @@ -7337,7 +7335,7 @@ test_file(void) test_libver_bounds_low_high(); test_libver_macros(); /* Test the macros for library version comparison */ test_libver_macros2(); /* Test the macros for library version comparison */ - test_incr_filesize(env_h5_drvr); /* Test H5Fincrement_filesize() and H5Fget_eoa() */ + test_incr_filesize(); /* Test H5Fincrement_filesize() and H5Fget_eoa() */ #ifndef H5_NO_DEPRECATED_SYMBOLS test_deprec(); /* Test deprecated routines */ #endif /* H5_NO_DEPRECATED_SYMBOLS */ -- cgit v0.12 From 62b4200f580e9ea0b95cbc218bfae50ae38ef25d Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 6 Apr 2018 17:19:29 -0500 Subject: Remove vestiges of H5_DEBUG_BUILD macro, switching it to the more standard H5CX_DEBUG form. --- configure.ac | 2 +- src/H5CX.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 98c97cc..c68caab 100644 --- a/configure.ac +++ b/configure.ac @@ -2243,7 +2243,7 @@ AC_SUBST([INTERNAL_DEBUG_OUTPUT]) ## are not listed in the "all" packages list. ## ## all_packages="AC,B,B2,D,F,FA,FL,FS,HL,I,O,S,ST,T,Z" -all_packages="AC,B2,D,F,HL,I,O,S,ST,T,Z" +all_packages="AC,B2,CX,D,F,HL,I,O,S,ST,T,Z" case "X-$INTERNAL_DEBUG_OUTPUT" in X-yes|X-all) diff --git a/src/H5CX.c b/src/H5CX.c index 9427e05..af2619b 100644 --- a/src/H5CX.c +++ b/src/H5CX.c @@ -826,11 +826,11 @@ H5CX_set_apl(hid_t *acspl_id, const H5P_libclass_t *libclass, else { htri_t is_lapl; /* Whether the access property list is (or is derived from) a link access property list */ -#ifdef H5_DEBUG_BUILD +#ifdef H5CX_DEBUG /* Sanity check the access property list class */ if(TRUE != H5P_isa_class(*acspl_id, *libclass->class_id)) HGOTO_ERROR(H5E_CONTEXT, H5E_BADTYPE, FAIL, "not the required access property list") -#endif /* H5_DEBUG_BUILD */ +#endif /* H5CX_DEBUG*/ /* Check for link access property and set API context if so */ if((is_lapl = H5P_class_isa(*libclass->pclass, *H5P_CLS_LACC->pclass)) < 0) -- cgit v0.12