folly/stats/BucketedTimeSeries-defs.h: avoid -Wsign-compare error
authorJim Meyering <meyering@fb.com>
Wed, 7 Jan 2015 17:30:43 +0000 (09:30 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:04 +0000 (11:01 -0800)
commit0d98066a0e8557e9cad2072c48b01d885b0b9125
treeaea6564623bcf8c8a609b8b60260070f6406a704
parentab794fb62edf575ae5985db55d9b4df815d96fc3
folly/stats/BucketedTimeSeries-defs.h: avoid -Wsign-compare error

Summary:
* folly/stats/BucketedTimeSeries-defs.h (BucketedTimeSeries):
Assume that maxDuration is never negative, and cast the signed
duration_.count() to size_t, to avoid this error from gcc-4.9:

folly/stats/BucketedTimeSeries-defs.h:38:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]

Test Plan:
Run this and note there are fewer errors than before:
fbconfig --platform-all=gcc-4.9-glibc-2.20 -r folly && fbmake dbgo

Reviewed By: andrei.alexandrescu@fb.com

Subscribers: trunkagent, net-systems@, folly-diffs@

FB internal diff: D1770171

Tasks: 5941250

Signature: t1:1770171:1420669115:61e6b8d3248f88b25736322c7066af015209fba5
folly/stats/BucketedTimeSeries-defs.h