folly/Format-inl.h: avoid -Wsign-compare error
authorJim Meyering <meyering@fb.com>
Wed, 7 Jan 2015 16:13:57 +0000 (08:13 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:04 +0000 (11:01 -0800)
commit453a7e48b8e998183f36048cbf11c2ec6daf33b5
tree1904ab31fd5a60ca2ba2607263be7552dc7016f8
parent3d4f7737d0b4142530501c0d9f4a18e51b0ffaa7
folly/Format-inl.h: avoid -Wsign-compare error

Summary:
* folly/Format-inl.h (IndexableTraitsSeq::at): Add an explicit
int-to-size_t cast (ok here, since we've just confirmed
that the value is not negative) to avoid this error from gcc-4.9:

folly/Format-inl.h:947:29: 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: tjackson@fb.com

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

FB internal diff: D1770193

Tasks: 5941250

Signature: t1:1770193:1420670569:83ac19c2ca8cd408d7c86d7dce49e2d4b418941a
folly/Format-inl.h