From 0f75d2ba6545deb9337a4f11b3fd4b4afa45b976 Mon Sep 17 00:00:00 2001 From: Bob Haarman Date: Tue, 30 Dec 2014 14:45:28 -0800 Subject: [PATCH] some fixes for clang-3.5 compatibility Summary: Clang 3.5 performs more rigorous static analysis than compilers we've previously used, and accordingly comes up with some additional warnings. This diff fixes some of the issues clang-3.5 warns about. Facebook: Test Plan: # after pulling in changes that allow clang-3.5 to be used fbconfig --clang --with-project-version clang:3.5 -r common/memory && fbmake runtests_opt fbconfig --clang --with-project-version clang:3.5 -r common/strings && fbmake runtests_opt fbconfig --clang --with-project-version clang:3.5 folly/test && fbmake runtests_opt Tests for common/strings and folly/test pass. common/memory has one test failure, which also occurs with clang-3.4, while eliminating a couple of test failures that clang-3.4 had. Reviewed By: meyering@fb.com Subscribers: fbcode-common-diffs@, sdwilsh, mathieubaudet, folly-diffs@ FB internal diff: D1761101 Signature: t1:1761101:1419976252:ff60166dc8986e1239f88012b5e552a7d204aede --- folly/io/async/AsyncServerSocket.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/folly/io/async/AsyncServerSocket.cpp b/folly/io/async/AsyncServerSocket.cpp index ea2a46d9..7539ac67 100644 --- a/folly/io/async/AsyncServerSocket.cpp +++ b/folly/io/async/AsyncServerSocket.cpp @@ -363,7 +363,6 @@ void AsyncServerSocket::bind(uint16_t port) { folly::ScopeGuard guard = folly::makeGuard([&]{ freeaddrinfo(res0); }); - DCHECK(&guard); for (res = res0; res; res = res->ai_next) { int s = socket(res->ai_family, res->ai_socktype, res->ai_protocol); -- 2.34.1