From 4c2646a5704e54d15fe2381621c77f035fda84d2 Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Thu, 22 Feb 2018 11:26:39 -0700 Subject: [PATCH] Bug 4822: Build failure (-Wformat) where time_t is not long int There is no good way to printf() time_t. AFAICT, Squid usually just casts to (long) int. TODO: Use C++ streams (with manipulators) instead. --- src/ipc/Kid.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ipc/Kid.cc b/src/ipc/Kid.cc index 9a3cc1fa178..0a416743255 100644 --- a/src/ipc/Kid.cc +++ b/src/ipc/Kid.cc @@ -90,7 +90,9 @@ Kid::reportStopped() const if (hopeless() && Config.hopelessKidRevivalDelay) { syslog(LOG_NOTICE, "Squid Parent: %s process %d will not be restarted for %ld " "seconds due to repeated, frequent failures", - theName.termedBuf(), pid, Config.hopelessKidRevivalDelay); + theName.termedBuf(), + pid, + static_cast(Config.hopelessKidRevivalDelay)); } }