Commit b89470b9 authored by Jim Meyering's avatar Jim Meyering Committed by Facebook GitHub Bot

folly/detail/MemoryIdler.cpp: fix platform010-exposed build errors

Summary:
We should all be migrating to platform010, for the improved performance of its
generated code and for its improved diagnostics/portability.

cast PTHREAD_STACK_MIN to size_t, since with glibc-2.34, it now has type long

This avoids the following errors:

  folly/detail/MemoryIdler.cpp:140:18: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'long' [-Werror,-Wsign-compare]

Differential Revision: D32057242

fbshipit-source-id: 1fae2aec5829a837e2aecf068f6c2c061c911e95
parent 8405118b
......@@ -137,7 +137,9 @@ static void fetchStackLimits() {
return;
}
assert(addr != nullptr);
assert(rawSize >= PTHREAD_STACK_MIN);
assert(
0 < PTHREAD_STACK_MIN &&
rawSize >= static_cast<size_t>(PTHREAD_STACK_MIN));
// glibc subtracts guard page from stack size, even though pthread docs
// seem to imply the opposite
......
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