folly: ProducerConsumerQueue: avoid many -Wsign-compare errors
authorJim Meyering <meyering@fb.com>
Wed, 7 Jan 2015 21:45:19 +0000 (13:45 -0800)
committerViswanath Sivakumar <viswanath@fb.com>
Tue, 13 Jan 2015 19:01:05 +0000 (11:01 -0800)
commit7fdf8141e4d3737ac2c45c16830a8dbaac19b445
tree54cdf984f45829dbde8b3839b5d9675502b57fe7
parentbc374dcbb0e552826e4bcbed1d8cbd479ce062c0
folly: ProducerConsumerQueue: avoid many -Wsign-compare errors

Summary:
There were many templates instantiated with signed types.
Changing them to unsigned avoids the compilation failures
noted below.  However, we'll have to watch arc-diff-spawned
tests for new failures, just in case.

This is by far the largest undecomposable patch of those
I've written for this task so far.  It is possible that
some subset of these changes accomplishes the same goal,
but once I managed to get a successful compilation, I have
only re-reviewed it once and did not try to shrink it.

Test Plan:
Without these changes, we would get the following 32 errors from gcc-4.9:
https://phabricator.fb.com/P19692642
With them, (and all of the other patches attached to the parent task,
all of fbcode compiles and passes its tests (modulo preexisting
failures and aborts).

Reviewed By: delong.j@fb.com

Subscribers: trunkagent, folly-diffs@

FB internal diff: D1773461

Tasks: 5941250

Signature: t1:1773461:1420821964:61635f3a2efc95e8d4457c36e7a5ee3a0a50df23
folly/ProducerConsumerQueue.h
folly/test/ProducerConsumerQueueBenchmark.cpp
folly/test/ProducerConsumerQueueTest.cpp