summaryrefslogtreecommitdiffstats
path: root/src/H5Fint.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@koziol.gov>2019-07-10 03:15:36 (GMT)
committerQuincey Koziol <koziol@koziol.gov>2019-07-10 03:15:36 (GMT)
commitdb7c43d375f6997dfc44d6153e7b015da571a8c9 (patch)
tree4f2c1e23d42540d4ea86870c29f11c217e2e566e /src/H5Fint.c
parent78e13fe8b09f4398519f58552d42651712284c76 (diff)
downloadhdf5-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/H5Fint.c')
-rw-r--r--src/H5Fint.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Fint.c b/src/H5Fint.c
index 6879d46..758900b 100644
--- a/src/H5Fint.c
+++ b/src/H5Fint.c
@@ -572,11 +572,11 @@ H5F__build_name(const char *prefix, const char *file_name, char **full_name/*out
fname_len = HDstrlen(file_name);
/* Allocate a buffer to hold the filename + prefix + possibly the delimiter + terminating null byte */
- if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 4)))
+ if(NULL == (*full_name = (char *)H5MM_malloc(prefix_len + fname_len + 2 + 2))) /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
HGOTO_ERROR(H5E_FILE, H5E_CANTALLOC, FAIL, "unable to allocate filename buffer")
/* Compose the full file name */
- HDsnprintf(*full_name, (prefix_len + fname_len + 4), "%s%s%s", prefix,
+ HDsnprintf(*full_name, (prefix_len + fname_len + 2 + 2), "%s%s%s", prefix, /* Extra "+2" to quiet GCC warning - 2019/07/05, QAK */
((prefix_len == 0 || H5_CHECK_DELIMITER(prefix[prefix_len - 1])) ? "" : H5_DIR_SEPS), file_name);
done: