diff options
author | Dana Robinson <43805+derobins@users.noreply.github.com> | 2023-10-17 18:05:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-17 18:05:20 (GMT) |
commit | e2d40ef16e014442fccea32bce2184fb2eb8e113 (patch) | |
tree | 81f5dd3b39a0c11dec98889be2348b46cb4c7b19 | |
parent | 45c4729799ba65fbca80fa5e600264e3ed0aa999 (diff) | |
download | hdf5-e2d40ef16e014442fccea32bce2184fb2eb8e113.zip hdf5-e2d40ef16e014442fccea32bce2184fb2eb8e113.tar.gz hdf5-e2d40ef16e014442fccea32bce2184fb2eb8e113.tar.bz2 |
Suppress format string warnings in subfiling test (#3699)
-rw-r--r-- | testpar/t_subfiling_vfd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index ccece41..7c56599 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -382,16 +382,20 @@ test_config_file(void) substr = strstr(config_buf, "hdf5_file"); VRFY(substr, "strstr succeeded"); + H5_GCC_CLANG_DIAG_OFF("format-nonliteral") snprintf(scan_format, sizeof(scan_format), "hdf5_file=%%%zus", (size_t)(PATH_MAX - 1)); VRFY((sscanf(substr, scan_format, tmp_buf) == 1), "sscanf succeeded"); + H5_GCC_CLANG_DIAG_ON("format-nonliteral") VRFY((strcmp(tmp_buf, resolved_path) == 0), "strcmp succeeded"); substr = strstr(config_buf, "subfile_dir"); VRFY(substr, "strstr succeeded"); + H5_GCC_CLANG_DIAG_OFF("format-nonliteral") snprintf(scan_format, sizeof(scan_format), "subfile_dir=%%%zus", (size_t)(PATH_MAX - 1)); VRFY((sscanf(substr, scan_format, tmp_buf) == 1), "sscanf succeeded"); + H5_GCC_CLANG_DIAG_ON("format-nonliteral") VRFY((strcmp(tmp_buf, subfile_dir) == 0), "strcmp succeeded"); |