Skip to content

Commit a522ad5

Browse files
nonassaAlan Lan
authored andcommitted
Fix snprintf format-truncation warning for GCC 14 CI coverage build (TICKET_489)
1 parent c6597c8 commit a522ad5

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_quickfix_parity.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,7 +1018,7 @@ TEST_CASE("QFP-8A: SendingTime within max_latency accepted",
10181018
auto now_t = std::chrono::system_clock::to_time_t(now);
10191019
std::tm tm{};
10201020
gmtime_r(&now_t, &tm);
1021-
char ts_buf[32];
1021+
char ts_buf[64];
10221022
std::snprintf(ts_buf, sizeof(ts_buf), "%04d%02d%02d-%02d:%02d:%02d.000",
10231023
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
10241024
tm.tm_hour, tm.tm_min, tm.tm_sec);
@@ -1082,7 +1082,7 @@ TEST_CASE("QFP-8B: SendingTime too old -> reject + logout",
10821082
auto now_t = std::chrono::system_clock::to_time_t(now);
10831083
std::tm tm{};
10841084
gmtime_r(&now_t, &tm);
1085-
char ts_buf[32];
1085+
char ts_buf[64];
10861086
std::snprintf(ts_buf, sizeof(ts_buf), "%04d%02d%02d-%02d:%02d:%02d.000",
10871087
tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
10881088
tm.tm_hour, tm.tm_min, tm.tm_sec);

0 commit comments

Comments
 (0)