diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-09-13 17:08:01 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-09-13 17:08:01 (GMT) |
commit | 602c716f76f3d4623ac24419dd8419a2a1817aaa (patch) | |
tree | 145b2ec66dfa8923e06c96a574e5d9fa8c650d32 /test/h5test.c | |
parent | 0ffdaff795a6811146b86e14b40f7aa57b0ce39d (diff) | |
download | hdf5-602c716f76f3d4623ac24419dd8419a2a1817aaa.zip hdf5-602c716f76f3d4623ac24419dd8419a2a1817aaa.tar.gz hdf5-602c716f76f3d4623ac24419dd8419a2a1817aaa.tar.bz2 |
[svn-r22758] Description:
Bring generic improvements from encode/decode property list branch to
the trunk. This includes a better version of the property list comparison
routine, cleaned up compiler warnings, and some cleaned up property list
callbacks. Also, started on changes to clean up parallel test output, so that
it doesn't report successful tests from each process.
Tested on:
Mac OSX/64 10.7.4 (amazon) w/debug, GCC 4.7.x, FORTRAN, C++, threadsafe and parallel
Linux 2.6/32 (jam) w/debug
Solaris 2.7/64 (linew) w/debug
Diffstat (limited to 'test/h5test.c')
-rw-r--r-- | test/h5test.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/test/h5test.c b/test/h5test.c index ea30fad..91497e3 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -408,7 +408,7 @@ h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size) if (!fullname[0]) /* We didn't append the prefix yet */ - HDstrncpy(fullname, prefix, MIN(strlen(prefix), size)); + HDstrncpy(fullname, prefix, MIN(HDstrlen(prefix), size)); if (HDstrlen(fullname) + HDstrlen(base_name) + 1 < size) { /* @@ -751,7 +751,7 @@ h5_set_info_object(void) /* copy key/value pair into temporary buffer */ len = strcspn(valp, ";"); next = &valp[len]; - key_val = calloc(1, len + 1); + key_val = (char *)calloc(1, len + 1); /* increment the next pointer past the terminating semicolon */ if (*next == ';') @@ -766,7 +766,7 @@ h5_set_info_object(void) if (!*namep) continue; /* was all white space, so move to next k/v pair */ /* eat up any ending white spaces */ - endp = &namep[strlen(namep) - 1]; + endp = &namep[HDstrlen(namep) - 1]; while (endp && (*endp == ' ' || *endp == '\t')) *endp-- = '\0'; @@ -1061,7 +1061,7 @@ getenv_all(MPI_Comm comm, int root, const char* name) if(mpi_rank == root) { env = HDgetenv(name); if(env) { - len = HDstrlen(env); + len = (int)HDstrlen(env); MPI_Bcast(&len, 1, MPI_INT, root, comm); MPI_Bcast(env, len, MPI_CHAR, root, comm); } @@ -1075,9 +1075,9 @@ getenv_all(MPI_Comm comm, int root, const char* name) MPI_Bcast(&len, 1, MPI_INT, root, comm); if(len >= 0) { if(env == NULL) - env = (char*) HDmalloc(len+1); - else if(strlen(env) < len) - env = (char*) HDrealloc(env, len+1); + env = (char*) HDmalloc((size_t)len+1); + else if(HDstrlen(env) < (size_t)len) + env = (char*) HDrealloc(env, (size_t)len+1); MPI_Bcast(env, len, MPI_CHAR, root, comm); env[len] = '\0'; @@ -1129,7 +1129,11 @@ h5_make_local_copy(const char *origfilename, const char *local_copy_name) #ifdef H5_VMS HDstrcat(filename, origfilename); #else - char * srcdir = HDgetenv("srcdir"); /* The source directory */ + const char * srcdir = HDgetenv("srcdir"); /* The source directory */ + + /* Check for using the srcdir from configure time */ + if(NULL == srcdir) + srcdir = config_srcdir; if(srcdir && ((HDstrlen(srcdir) + HDstrlen(origfilename) + 6) < FILENAME_BUF_SIZE)) { |