some fixes for clang-3.5 compatibility
authorBob Haarman <robbert@fb.com>
Tue, 30 Dec 2014 22:45:28 +0000 (14:45 -0800)
committerAjit Banerjee <ajitb@fb.com>
Wed, 7 Jan 2015 20:24:35 +0000 (12:24 -0800)
commit0f75d2ba6545deb9337a4f11b3fd4b4afa45b976
tree2a7f777f1fad99d8b5667f07c960a104f65be93c
parentb7912274c8c83eba09064ad943359252a32eeb85
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