Histogram and Timeseries vs gcc-4.9 and -Wsign-compare
Summary:
Address multiple -Werror=sign-compare issues exposed when building
tao with gcc-4.9.
In most of these changes I've changed the type of the index in
a for-loop from int to size_t. The important thing is to use
an unsigned type when the limit is also unsigned. I choose size_t
because the general recommendation (when writing portable code)
to avoid size-tied types like uint32_t and uint64_t unless you
have a very good reason to require them.
Test Plan:
Run this and note there are fewer errors than before:
fbconfig --platform-all=gcc-4.9-glibc-2.20 tao/server && fbmake dbgo
Reviewed By: andrei.alexandrescu@fb.com
Subscribers: trunkagent, net-systems@, folly-diffs@
FB internal diff:
D1766651
Tasks:
5941250
Signature: t1:
1766651:
1420594537:
56ef53ca233e1649469db9570942c1d5dd47cf6d