warning fix

format string is not a string literal (potentially insecure) [-Wformat-security]
This commit is contained in:
2025-02-27 15:38:13 +08:00
parent 213e20b4db
commit 282b17d7ca

View File

@@ -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;