Commit 3d420c10 authored by Daniel Sommermann's avatar Daniel Sommermann Committed by Pavlo Kushnir

Fix -Wsign-compare

Summary:
Fixed unsigned/signed compares.

I had to suppress the warning in one place, but don't worry, clang
supports `#pragma GCC diagnostic ...` (see http://clang.llvm.org/docs/UsersManual.html#controlling-diagnostics-via-pragmas)

Test Plan: unit tests

Reviewed By: afrind@fb.com

Subscribers: alandau, mshneer, trunkagent, doug, jdperlow, bmatheny, njormrod, cgheorghe, folly-diffs@

FB internal diff: D1624249

Tasks: 5140804

Signature: t1:1624249:1414620209:5399e8d90d8ca32b30794a7b2a4a7c2d7d437dda
parent 79b456fe
......@@ -76,7 +76,7 @@ inline uint64_t timespecDiff(timespec end, timespec start) {
return end.tv_nsec - start.tv_nsec;
}
assert(end.tv_sec > start.tv_sec &&
end.tv_sec - start.tv_sec <
(uint64_t)(end.tv_sec - start.tv_sec) <
std::numeric_limits<uint64_t>::max() / 1000000000UL);
return (end.tv_sec - start.tv_sec) * 1000000000UL
+ end.tv_nsec - start.tv_nsec;
......
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