]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 4822: Build failure (-Wformat) where time_t is not long int (#158)
authorAlex Rousskov <rousskov@measurement-factory.com>
Sat, 24 Feb 2018 00:33:37 +0000 (17:33 -0700)
committerAmos Jeffries <yadij@users.noreply.github.com>
Mon, 26 Feb 2018 12:50:51 +0000 (01:50 +1300)
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

index 9a3cc1fa178b9435876bb05549d0f79d00082603..0a416743255ade9c4a1bc6f6242b8a2138a0edf9 100644 (file)
@@ -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<long int>(Config.hopelessKidRevivalDelay));
     }
 }