Commit 042bbfeb authored by Jim Meyering's avatar Jim Meyering Committed by Viswanath Sivakumar

folly/wangle/channel/ChannelPipeline.h: avoid -Wsign-compare errors (trivial)

Summary:
* folly/wangle/channel/ChannelPipeline.h: Declare for-loop indices
to be of type size_t(not int), to match size of upper bound.
Otherwise, gcc-4.9 fails with e.g.,
folly/wangle/channel/ChannelPipeline.h:126:23: 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: davejwatson@fb.com

Subscribers: fugalh, folly-diffs@

FB internal diff: D1767783

Tasks: 5941250

Signature: t1:1767783:1420587925:d662b75e6a62ebd5bacdde28ad6e1da22ef777ac
parent 32172a24
......@@ -123,7 +123,7 @@ class ChannelPipeline<R, W> : public DelayedDestruction {
return;
}
for (int i = 0; i < ctxs_.size() - 1; i++) {
for (size_t i = 0; i < ctxs_.size() - 1; i++) {
ctxs_[i]->link(ctxs_[i+1].get());
}
......@@ -293,7 +293,7 @@ class ChannelPipeline<R, W, Handler, Handlers...>
}
if (!ctxs_.empty()) {
for (int i = 0; i < ctxs_.size() - 1; i++) {
for (size_t i = 0; i < ctxs_.size() - 1; i++) {
ctxs_[i]->link(ctxs_[i+1].get());
}
ctxs_.back()->link(&ctx_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment