Commit 21dc1d37 authored by Dmytro Stechenko's avatar Dmytro Stechenko Committed by Facebook GitHub Bot

fix -Wsign-compare in hazptr

Summary:
building on windows fails:
```
buck-out/cells/fbsource/gen/xplat/third-party/glog/glogWindows#header-mode-symlink-tree-only,headers\glog/logging.h:698:32:
error: comparison of integers of different signs: 'const unsigned long long' and 'const int' [-Werror,-Wsign-compare]

buck-out/dev/gen/folly/synchronization/hazptr#header-mode-symlink-tree-only,headers\folly/synchronization/HazptrObj.h:397:13:
note: in instantiation of function template specialization 'google::Check_EQImpl<unsigned long long, int>' requested here
            DCHECK_EQ(reinterpret_cast<uintptr_t>(p) & 7, 0) << p << " " << i;
```

Reviewed By: yfeldblum

Differential Revision: D20482798

fbshipit-source-id: 4b661121401890cec113905fc6b53cd9189fcca0
parent 1e93e64f
......@@ -394,7 +394,8 @@ class hazptr_obj_cohort {
if (kIsDebug) {
Obj* p = ll.head();
for (int i = 1; p; ++i, p = p->next()) {
DCHECK_EQ(reinterpret_cast<uintptr_t>(p) & 7, 0) << p << " " << i;
DCHECK_EQ(reinterpret_cast<uintptr_t>(p) & 7, uintptr_t{0})
<< p << " " << i;
}
}
hazptr_obj_list<Atom> l(ll.head(), ll.tail(), c);
......
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