]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
%tS logformat code, part3
authorChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 9 Dec 2013 16:54:56 +0000 (18:54 +0200)
committerChristos Tsantilas <chtsanti@users.sourceforge.net>
Mon, 9 Dec 2013 16:54:56 +0000 (18:54 +0200)
Fix build when GCC 4,4.3 used

src/format/Format.cc

index 15bef5e86888653fdc37ea975699f4f1edcf4989..f6d903c6f27bd1b86a610e5ec8cb86f5f127027f 100644 (file)
@@ -497,7 +497,7 @@ Format::Format::assemble(MemBuf &mb, const AccessLogEntry::Pointer &al, int logS
 
         case LFT_TIME_START: {
             int precision = fmt->widthMax >=0 ? fmt->widthMax : 3;
-            snprintf(tmp, sizeof(tmp), "%0*" PRId64 ".%0*d", fmt->zero && (fmt->widthMin - precision - 1 >= 0) ? fmt->widthMin - precision - 1 : 0, al->cache.start_time.tv_sec, precision, (int)(al->cache.start_time.tv_usec / fmt->divisor));
+            snprintf(tmp, sizeof(tmp), "%0*" PRId64 ".%0*d", fmt->zero && (fmt->widthMin - precision - 1 >= 0) ? fmt->widthMin - precision - 1 : 0, static_cast<int64_t>(al->cache.start_time.tv_sec), precision, (int)(al->cache.start_time.tv_usec / fmt->divisor));
             out = tmp;
         }
             break;