mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-12-27 08:01:04 +08:00
Suppress format string warnings in subfiling test (#3699)
This commit is contained in:
parent
45c4729799
commit
e2d40ef16e
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user