Make semaphore.h a non-portable header
[folly.git] / folly / test / AtomicUnorderedMapTest.cpp
index e1a0104c5f3ca643b1f879a6c4bb255608a2bb31..957b6063330dfb102e09cfdaa98c2004486e4edc 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2016 Facebook, Inc.
+ * Copyright 2017 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 
 #include <folly/AtomicUnorderedMap.h>
 
-#include <semaphore.h>
 #include <thread>
 #include <unordered_map>
 
 #include <folly/Benchmark.h>
 #include <folly/portability/GFlags.h>
 #include <folly/portability/GTest.h>
+#include <folly/portability/Semaphore.h>
 #include <folly/test/DeterministicSchedule.h>
 
 using namespace folly;
@@ -275,7 +275,7 @@ void contendedRW(size_t itersPerThread,
               if (!pr.second) {
                 pr.first->second.data++;
               }
-            } catch (std::bad_alloc& x) {
+            } catch (std::bad_alloc&) {
               LOG(INFO) << "bad alloc";
             }
           }