From 314f48ccd34b6225b2ed572826bc018dabfbb97b Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 6 Jan 2015 15:29:48 -0800 Subject: [PATCH] folly/experimental/test/BitsBenchmark.cpp: avoid -Wsign-compare error Summary: * folly/experimental/test/BitsBenchmark.cpp (benchmarkSet): Another s/int/size_t/ change to type of for-loop index, to match the type of the loop's upper bound. 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: folly-diffs@ FB internal diff: D1767853 Tasks: 5941250 Signature: t1:1767853:1420587945:f32a0ef33f6c5fa75598ecb114a243f83b31e550 --- folly/experimental/test/BitsBenchmark.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/experimental/test/BitsBenchmark.cpp b/folly/experimental/test/BitsBenchmark.cpp index 08230eac..379b71e0 100644 --- a/folly/experimental/test/BitsBenchmark.cpp +++ b/folly/experimental/test/BitsBenchmark.cpp @@ -44,7 +44,7 @@ void benchmarkSet(size_t n, T) { CHECK_LE(folly::findLastSet(max), size); CHECK_LE(folly::findLastSet(-min), size); std::uniform_int_distribution dis(min, max); - for (int i = 0; i < k; ++i) { + for (size_t i = 0; i < k; ++i) { values[i] = dis(gen); } } -- 2.34.1