diff options
author | Quincey Koziol <koziol@koziol.gov> | 2019-07-10 03:15:36 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@koziol.gov> | 2019-07-10 03:15:36 (GMT) |
commit | db7c43d375f6997dfc44d6153e7b015da571a8c9 (patch) | |
tree | 4f2c1e23d42540d4ea86870c29f11c217e2e566e /src/H5system.c | |
parent | 78e13fe8b09f4398519f58552d42651712284c76 (diff) | |
download | hdf5-db7c43d375f6997dfc44d6153e7b015da571a8c9.zip hdf5-db7c43d375f6997dfc44d6153e7b015da571a8c9.tar.gz hdf5-db7c43d375f6997dfc44d6153e7b015da571a8c9.tar.bz2 |
Updates to warnhist script, along with a few cleanups, and add some comments
to warning cleanups that are a bit obscure.
Diffstat (limited to 'src/H5system.c')
-rw-r--r-- | src/H5system.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5system.c b/src/H5system.c index bd5f9c5..1d47d13 100644 --- a/src/H5system.c +++ b/src/H5system.c @@ -1301,11 +1301,11 @@ H5_combine_path(const char* path1, const char* path2, char **full_name /*out*/) * Allocate a buffer to hold path1 + path2 + possibly the delimiter * + terminating null byte */ - if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 4))) + if(NULL == (*full_name = (char *)H5MM_malloc(path1_len + path2_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */ HGOTO_ERROR(H5E_RESOURCE, H5E_NOSPACE, FAIL, "unable to allocate filename buffer") /* Compose the full file name */ - HDsnprintf(*full_name, (path1_len + path2_len + 4), "%s%s%s", path1, + HDsnprintf(*full_name, (path1_len + path2_len + 2 + 2), "%s%s%s", path1, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */ (H5_CHECK_DELIMITER(path1[path1_len - 1]) ? "" : H5_DIR_SEPS), path2); } /* end else */ |