From 282b17d7caf6f3cf4fe2d583bf4e5431514376e9 Mon Sep 17 00:00:00 2001 From: Anton Anikin Date: Thu, 27 Feb 2025 15:38:13 +0800 Subject: [PATCH] warning fix format string is not a string literal (potentially insecure) [-Wformat-security] --- test/test_ipc_c_api.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_ipc_c_api.cpp b/test/test_ipc_c_api.cpp index d674f9c..fc8caa2 100644 --- a/test/test_ipc_c_api.cpp +++ b/test/test_ipc_c_api.cpp @@ -47,7 +47,7 @@ main(int /* argc */, char** /* argv */) auto hline = "\n------------------------\n"; for (int i = 2; i <= 5; ++i) { std::this_thread::sleep_for(500ms); - printf(hline); + printf("%s", hline); { ipc_write_int(client, &i, 1); @@ -60,7 +60,7 @@ main(int /* argc */, char** /* argv */) } } - printf(hline); + printf("%s", hline); printf("[c-client] finish the work\n\n"); return 0;