From: Christos Tsantilas Date: Mon, 9 Dec 2013 16:54:56 +0000 (+0200) Subject: %tS logformat code, part3 X-Git-Tag: SQUID_3_5_0_1~468 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9989b942464a42b7f2e16d049ec24115d7a26093;p=thirdparty%2Fsquid.git %tS logformat code, part3 Fix build when GCC 4,4.3 used --- diff --git a/src/format/Format.cc b/src/format/Format.cc index 15bef5e868..f6d903c6f2 100644 --- a/src/format/Format.cc +++ b/src/format/Format.cc @@ -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(al->cache.start_time.tv_sec), precision, (int)(al->cache.start_time.tv_usec / fmt->divisor)); out = tmp; } break;