From f6aa963667da52b753459150edf5a297332d3196 Mon Sep 17 00:00:00 2001 From: LIU Hao Date: Tue, 23 Jan 2024 22:52:22 +0800 Subject: [PATCH] main: Get rid a warning about unused results --- poseidon/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/poseidon/main.cpp b/poseidon/main.cpp index 9e7eb347..0e5691e7 100644 --- a/poseidon/main.cpp +++ b/poseidon/main.cpp @@ -540,7 +540,7 @@ do_write_pid_file() // Write the PID of myself. Errors are ignored. POSEIDON_LOG_DEBUG(("Writing current process ID to '$1'"), pid_file_path.c_str()); ::dprintf(pid_file_fd, "%d\n", (int) ::getpid()); - ::at_quick_exit([] { ::ftruncate(pid_file_fd, 0); }); + ::at_quick_exit([] { (void)! ::ftruncate(pid_file_fd, 0); }); // Downgrade the lock so the PID may be read by others. ::flock(pid_file_fd, LOCK_SH);