------------------------------------------------------------ revno: 13177 revision-id: chtsanti@users.sourceforge.net-20131209165456-ljz4jmnzhdc26wao parent: squid3@treenet.co.nz-20131209011753-sy8xnhv691wmc2ly committer: Christos Tsantilas branch nick: trunk timestamp: Mon 2013-12-09 18:54:56 +0200 message: %tS logformat code, part3 Fix build when GCC 4,4.3 used ------------------------------------------------------------ # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: chtsanti@users.sourceforge.net-20131209165456-\ # ljz4jmnzhdc26wao # target_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # testament_sha1: 512db32ba834032feef4011fca0dcf0cd3f827ab # timestamp: 2013-12-09 17:53:45 +0000 # source_branch: http://bzr.squid-cache.org/bzr/squid3/trunk/ # base_revision_id: squid3@treenet.co.nz-20131209011753-\ # sy8xnhv691wmc2ly # # Begin patch === modified file 'src/format/Format.cc' --- src/format/Format.cc 2013-12-06 14:59:47 +0000 +++ src/format/Format.cc 2013-12-09 16:54:56 +0000 @@ -497,7 +497,7 @@ 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;