This is an automated email from the ASF dual-hosted git repository. amc pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push: new cfd2f6a Clang6: Fix nullptr use in AtomicList. This shoud cover 3 different issues. cfd2f6a is described below commit cfd2f6a5745a2199159ca3dabbfda812aae88df9 Author: Alan M. Carroll <a...@apache.org> AuthorDate: Tue May 8 08:14:00 2018 -0500 Clang6: Fix nullptr use in AtomicList. This shoud cover 3 different issues. --- lib/ts/List.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ts/List.h b/lib/ts/List.h index d3ae4db..f58b5a3 100644 --- a/lib/ts/List.h +++ b/lib/ts/List.h @@ -739,5 +739,7 @@ template <class C, class L = typename C::Link_link> struct AtomicSLL { template <class C, class L> inline AtomicSLL<C, L>::AtomicSLL() { - ink_atomiclist_init(&al, "AtomicSLL", (uint32_t)(uintptr_t)&L::next_link((C *)nullptr)); + // need @c offsetof but that's not reliable until C++17, and we can't use the nullptr trick directly because + // clang-analyzer gets upset, so we use 0x10 as the base and subtract it back afterwards. + ink_atomiclist_init(&al, "AtomicSLL", reinterpret_cast<uintptr_t>(&L::next_link(reinterpret_cast<C *>(0x10))) - 0x10); } -- To stop receiving notification emails like this one, please contact a...@apache.org.