Summary:
Avoid this false positive from clang:
folly/futures/detail/Core.h:369:15: error: variable 'priority' may be uninitialized when used here [-Werror,-Wconditional-uninitialized]
Reviewed By: yfeldblum
Differential Revision:
D5369916
fbshipit-source-id:
49649417d1b799cc3945cba456b42ab438ad2ddc
void doCallback() {
Executor* x = executor_;
- int8_t priority;
+ // initialize, solely to appease clang's -Wconditional-uninitialized
+ int8_t priority = 0;
if (x) {
if (!executorLock_.try_lock()) {
executorLock_.lock();