Commit 0f75d2ba authored by Bob Haarman's avatar Bob Haarman Committed by Ajit Banerjee

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
parent b7912274
......@@ -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);
......
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