Commit a55fdc39 authored by Michael Lee (Engineering)'s avatar Michael Lee (Engineering) Committed by Facebook GitHub Bot

`FOLLY_MAYBE_UNUSED` does not work on Windows

Summary:
`frame` may be unused depending on whether it is compiled with or without asserts.

`FOLLY_MAYBE_UNUSED` is supposed to take care of this, but it does not work on Windows and trips up the comiler:

```
warning C4100: frame: unreferenced formal parameter
```

Reviewed By: johnkearney, akrieger

Differential Revision: D24451220

fbshipit-source-id: 8225640a5e8fd0ceed4ffcc53cea7422a5581d6f
parent 9ffd6285
...@@ -20,6 +20,7 @@ namespace folly { ...@@ -20,6 +20,7 @@ namespace folly {
inline void checkAsyncStackFrameIsActive( inline void checkAsyncStackFrameIsActive(
FOLLY_MAYBE_UNUSED const folly::AsyncStackFrame& frame) noexcept { FOLLY_MAYBE_UNUSED const folly::AsyncStackFrame& frame) noexcept {
(void)frame;
assert(frame.stackRoot != nullptr); assert(frame.stackRoot != nullptr);
assert(tryGetCurrentAsyncStackRoot() == frame.stackRoot); assert(tryGetCurrentAsyncStackRoot() == frame.stackRoot);
assert(frame.stackRoot->topFrame.load(std::memory_order_relaxed) == &frame); assert(frame.stackRoot->topFrame.load(std::memory_order_relaxed) == &frame);
......
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