folly: fix build with clang 3.6 -Werror
authorIgor Sugak <sugak@fb.com>
Tue, 13 Oct 2015 00:18:50 +0000 (17:18 -0700)
committerfacebook-github-bot-4 <folly-bot@fb.com>
Tue, 13 Oct 2015 05:21:09 +0000 (22:21 -0700)
Summary: Fix a few `-Wsign-compare` violations

Reviewed By: @meyering

Differential Revision: D2527969

fb-gh-sync-id: 140acbd06eedf2e2a315e1927b331ff5efb20d0f

folly/test/ReadMostlySharedPtrBenchmark.cpp

index e135b6c22a71a40293c8f57dcbfaf28c8b4a8e87..37abfc05986219e82dfd363aed833e7c5582460e 100644 (file)
@@ -201,7 +201,7 @@ void benchReadsWhenWriting(int n) {
     });
   }
 
     });
   }
 
-  for (uint64_t i = 0; i < n; ++i) {
+  for (int i = 0; i < n; ++i) {
     auto val = ptr.load();
     folly::doNotOptimizeAway(val.get());
   }
     auto val = ptr.load();
     folly::doNotOptimizeAway(val.get());
   }
@@ -229,7 +229,7 @@ void benchWritesWhenReading(int n) {
   }
 
 
   }
 
 
-  for (uint64_t i = 0; i < n; ++i) {
+  for (int i = 0; i < n; ++i) {
     ptr.store(folly::make_unique<int>(3));
   }
 
     ptr.store(folly::make_unique<int>(3));
   }