diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2013-04-12 22:36:34 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2013-04-12 22:36:34 (GMT) |
commit | 94f89911545edce6fc9ebde2c83357cbda0bbd70 (patch) | |
tree | ea81574cb50d78ff04256ec1ca42c959249e4498 /test/h5test.c | |
parent | 4ce17c9aa6515c32551104516b32caf8b0ce9f02 (diff) | |
download | hdf5-94f89911545edce6fc9ebde2c83357cbda0bbd70.zip hdf5-94f89911545edce6fc9ebde2c83357cbda0bbd70.tar.gz hdf5-94f89911545edce6fc9ebde2c83357cbda0bbd70.tar.bz2 |
[svn-r23582] Bring revisions 22708:22730 from trunk to revise_chunks.
h5committested.
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)) { |