summaryrefslogtreecommitdiff
path: root/zen/thread.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:29 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:20:29 +0200
commitb8f13e45be884dc12884ebe8f3dcd9eecb23a106 (patch)
tree22a6d8b96815d626061ff3e2d432c13078fca5c4 /zen/thread.h
parent5.4 (diff)
downloadFreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.tar.gz
FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.tar.bz2
FreeFileSync-b8f13e45be884dc12884ebe8f3dcd9eecb23a106.zip
5.5
Diffstat (limited to 'zen/thread.h')
-rw-r--r--zen/thread.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/zen/thread.h b/zen/thread.h
index 3fb73e70..1fda016d 100644
--- a/zen/thread.h
+++ b/zen/thread.h
@@ -11,15 +11,15 @@
#include <memory>
#include "fixed_list.h"
+//fix this pathetic boost thread warning mess
#ifdef __MINGW32__
#pragma GCC diagnostic push
-
#pragma GCC diagnostic ignored "-Wswitch-enum"
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
-//#pragma GCC diagnostic ignored "-Wno-attributes"
-//#pragma GCC diagnostic ignored "-Wredundant-decls"
-//#pragma GCC diagnostic ignored "-Wcast-align"
-//#pragma GCC diagnostic ignored "-Wunused-value"
+#pragma GCC diagnostic ignored "-Wshadow"
+#endif
+#ifdef _MSC_VER
+#pragma warning(disable : 4702) //unreachable code
#endif
#include <boost/thread.hpp>
@@ -27,6 +27,9 @@
#ifdef __MINGW32__
#pragma GCC diagnostic pop
#endif
+#ifdef _MSC_VER
+#pragma warning(default : 4702) //unreachable code
+#endif
namespace zen
{
@@ -89,7 +92,7 @@ auto async2(Function fun) -> boost::unique_future<T> //workaround VS2010 bug: bo
boost::packaged_task<T> pt([=] { return fun(); });
auto fut = pt.get_future();
boost::thread(std::move(pt));
- return std::move(fut);
+ return std::move(fut); //compiler error without "move", why needed???
}
bgstack15