folly/AtomicHashMap-inl.h: avoid -Wsign-compare warning/error (easy)
authorJim Meyering <meyering@fb.com>
Tue, 6 Jan 2015 20:45:11 +0000 (12:45 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:04 +0000 (11:01 -0800)
commit69e1c7dc768a985bc4de034141cced656d46a5b4
treeab4254b46415e391832542d456d21665dbbf7c59
parent29be5d6dca2f048f194d890c8e6c90a999fd3ba4
folly/AtomicHashMap-inl.h: avoid -Wsign-compare warning/error (easy)

Summary:
* folly/AtomicHashMap-inl.h (insertInternal): Do not declare
nextMapIdx to be signed ("int"), since we compare it against
variables of unsigned type.  Otherwise, gcc-4.9 would give this
diagnostic:
folly/AtomicHashMap-inl.h:99:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
complaining about this comparison:
if (nextMapIdx >= kNumSubMaps_ ||

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: philipp@fb.com

Subscribers: folly-diffs@

FB internal diff: D1770683

Tasks: 5941250

Signature: t1:1770683:1420683505:4452c7cb4f14f098be089601be906884036348ed
folly/AtomicHashMap-inl.h