From b197496065db412c52af324088b41efab45377d6 Mon Sep 17 00:00:00 2001 From: Mathieu Baudet Date: Tue, 24 Jan 2017 14:34:42 -0800 Subject: [PATCH] folly: remove unused includes Summary: Found with our include analysis tool. I had to tweak `portability/Environment.h` to avoid a false positive breaking win32. Reviewed By: yfeldblum, Orvid Differential Revision: D4452463 fbshipit-source-id: e2e862e204892037ddde8815218e4deab1bfbb06 --- folly/experimental/io/HugePageUtil.cpp | 2 -- folly/experimental/io/HugePages.cpp | 4 ---- folly/experimental/symbolizer/SignalHandler.cpp | 2 -- folly/experimental/test/LockFreeRingBufferTest.cpp | 1 - folly/experimental/test/TestUtilTest.cpp | 2 -- folly/futures/test/TimesTest.cpp | 2 -- folly/futures/test/WhenTest.cpp | 3 --- folly/futures/test/WhileDoTest.cpp | 2 -- folly/gen/test/CombineTest.cpp | 1 - folly/gen/test/StringTest.cpp | 2 -- folly/io/ShutdownSocketSet.cpp | 1 - folly/io/async/ScopedEventBaseThread.cpp | 1 - folly/io/async/test/AsyncSSLSocketWriteTest.cpp | 1 - folly/json.cpp | 1 - folly/portability/Environment.h | 3 +-- folly/test/AtomicHashMapTest.cpp | 1 - folly/test/ExceptionTest.cpp | 2 -- folly/test/FBStringBenchmark.cpp | 1 - folly/test/RandomBenchmark.cpp | 1 - folly/test/SharedMutexTest.cpp | 1 - folly/test/ThreadCachedArenaTest.cpp | 1 - 21 files changed, 1 insertion(+), 34 deletions(-) diff --git a/folly/experimental/io/HugePageUtil.cpp b/folly/experimental/io/HugePageUtil.cpp index c1ec7e13..a09c1297 100644 --- a/folly/experimental/io/HugePageUtil.cpp +++ b/folly/experimental/io/HugePageUtil.cpp @@ -17,11 +17,9 @@ #include #include -#include #include #include #include -#include #include #include diff --git a/folly/experimental/io/HugePages.cpp b/folly/experimental/io/HugePages.cpp index baa80f52..0733d3a9 100644 --- a/folly/experimental/io/HugePages.cpp +++ b/folly/experimental/io/HugePages.cpp @@ -27,15 +27,11 @@ #include #include -#include #include -#include - #include #include #include -#include #include #include diff --git a/folly/experimental/symbolizer/SignalHandler.cpp b/folly/experimental/symbolizer/SignalHandler.cpp index 5ce2a45e..b1837f40 100644 --- a/folly/experimental/symbolizer/SignalHandler.cpp +++ b/folly/experimental/symbolizer/SignalHandler.cpp @@ -32,8 +32,6 @@ #include #include -#include -#include #include #include #include diff --git a/folly/experimental/test/LockFreeRingBufferTest.cpp b/folly/experimental/test/LockFreeRingBufferTest.cpp index 4ee1ff04..dd1567fd 100644 --- a/folly/experimental/test/LockFreeRingBufferTest.cpp +++ b/folly/experimental/test/LockFreeRingBufferTest.cpp @@ -17,7 +17,6 @@ #include #include -#include #include #include #include diff --git a/folly/experimental/test/TestUtilTest.cpp b/folly/experimental/test/TestUtilTest.cpp index 7e002ae3..acf9a1f4 100644 --- a/folly/experimental/test/TestUtilTest.cpp +++ b/folly/experimental/test/TestUtilTest.cpp @@ -16,8 +16,6 @@ #include -#include - #include #include diff --git a/folly/futures/test/TimesTest.cpp b/folly/futures/test/TimesTest.cpp index 794a0170..d8464921 100644 --- a/folly/futures/test/TimesTest.cpp +++ b/folly/futures/test/TimesTest.cpp @@ -18,8 +18,6 @@ #include #include -#include - #include #include #include diff --git a/folly/futures/test/WhenTest.cpp b/folly/futures/test/WhenTest.cpp index 9d06e44b..3d6bdc84 100644 --- a/folly/futures/test/WhenTest.cpp +++ b/folly/futures/test/WhenTest.cpp @@ -17,10 +17,7 @@ #include #include -#include - #include -#include #include using namespace folly; diff --git a/folly/futures/test/WhileDoTest.cpp b/folly/futures/test/WhileDoTest.cpp index 6d811479..b23770a5 100644 --- a/folly/futures/test/WhileDoTest.cpp +++ b/folly/futures/test/WhileDoTest.cpp @@ -18,8 +18,6 @@ #include #include -#include - #include #include #include diff --git a/folly/gen/test/CombineTest.cpp b/folly/gen/test/CombineTest.cpp index c0c32c82..42c90405 100644 --- a/folly/gen/test/CombineTest.cpp +++ b/folly/gen/test/CombineTest.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include #include diff --git a/folly/gen/test/StringTest.cpp b/folly/gen/test/StringTest.cpp index 82239479..b417e3f1 100644 --- a/folly/gen/test/StringTest.cpp +++ b/folly/gen/test/StringTest.cpp @@ -14,8 +14,6 @@ * limitations under the License. */ -#include - #include #include #include diff --git a/folly/io/ShutdownSocketSet.cpp b/folly/io/ShutdownSocketSet.cpp index 87ecbf2e..138091c3 100644 --- a/folly/io/ShutdownSocketSet.cpp +++ b/folly/io/ShutdownSocketSet.cpp @@ -22,7 +22,6 @@ #include #include -#include #include namespace folly { diff --git a/folly/io/async/ScopedEventBaseThread.cpp b/folly/io/async/ScopedEventBaseThread.cpp index a8049462..25f0cba7 100644 --- a/folly/io/async/ScopedEventBaseThread.cpp +++ b/folly/io/async/ScopedEventBaseThread.cpp @@ -19,7 +19,6 @@ #include #include -#include #include using namespace std; diff --git a/folly/io/async/test/AsyncSSLSocketWriteTest.cpp b/folly/io/async/test/AsyncSSLSocketWriteTest.cpp index 71dd5084..d47af702 100644 --- a/folly/io/async/test/AsyncSSLSocketWriteTest.cpp +++ b/folly/io/async/test/AsyncSSLSocketWriteTest.cpp @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include #include #include #include diff --git a/folly/json.cpp b/folly/json.cpp index 4449e779..f101a7b5 100644 --- a/folly/json.cpp +++ b/folly/json.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include #include diff --git a/folly/portability/Environment.h b/folly/portability/Environment.h index d69cad5c..ae8dc61c 100755 --- a/folly/portability/Environment.h +++ b/folly/portability/Environment.h @@ -21,8 +21,7 @@ extern "C" { #ifndef _WIN32 extern char** environ; -#else +#endif int setenv(const char* name, const char* value, int overwrite); int unsetenv(const char* name); -#endif } diff --git a/folly/test/AtomicHashMapTest.cpp b/folly/test/AtomicHashMapTest.cpp index 99378411..6fb8d84f 100644 --- a/folly/test/AtomicHashMapTest.cpp +++ b/folly/test/AtomicHashMapTest.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include #include diff --git a/folly/test/ExceptionTest.cpp b/folly/test/ExceptionTest.cpp index 0a8268bb..eb796503 100644 --- a/folly/test/ExceptionTest.cpp +++ b/folly/test/ExceptionTest.cpp @@ -22,8 +22,6 @@ #include #include -#include - namespace folly { namespace test { #define EXPECT_SYSTEM_ERROR(statement, err, msg) \ diff --git a/folly/test/FBStringBenchmark.cpp b/folly/test/FBStringBenchmark.cpp index b8f019f7..f50a2894 100644 --- a/folly/test/FBStringBenchmark.cpp +++ b/folly/test/FBStringBenchmark.cpp @@ -24,7 +24,6 @@ #include #include -#include #include #include diff --git a/folly/test/RandomBenchmark.cpp b/folly/test/RandomBenchmark.cpp index 68428301..287482e5 100644 --- a/folly/test/RandomBenchmark.cpp +++ b/folly/test/RandomBenchmark.cpp @@ -18,7 +18,6 @@ #include #include -#include #include diff --git a/folly/test/SharedMutexTest.cpp b/folly/test/SharedMutexTest.cpp index 120dc595..d18e3b6e 100644 --- a/folly/test/SharedMutexTest.cpp +++ b/folly/test/SharedMutexTest.cpp @@ -26,7 +26,6 @@ #include #include #include -#include #include #include #include diff --git a/folly/test/ThreadCachedArenaTest.cpp b/folly/test/ThreadCachedArenaTest.cpp index f9076fce..ea978dc1 100644 --- a/folly/test/ThreadCachedArenaTest.cpp +++ b/folly/test/ThreadCachedArenaTest.cpp @@ -29,7 +29,6 @@ #include #include -#include #include using namespace folly; -- 2.34.1