From 1ea9dddcf2b3b4703402355fd0bb943b56c03bdb Mon Sep 17 00:00:00 2001 From: niklasblabla Date: Fri, 9 Jan 2015 14:59:31 +0100 Subject: [PATCH 1/2] Reorder variable declarations to omit -Wreorder If you try to compile code with -Wall -Werror the code won't compile. --- mingw.condition_variable.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mingw.condition_variable.h b/mingw.condition_variable.h index acb6fbc..b9ff69b 100644 --- a/mingw.condition_variable.h +++ b/mingw.condition_variable.h @@ -28,9 +28,9 @@ class condition_variable_any { protected: recursive_mutex mMutex; + atomic mNumWaiters; HANDLE mSemaphore; HANDLE mWakeEvent; - atomic mNumWaiters; public: typedef HANDLE native_handle_type; native_handle_type native_handle() {return mSemaphore;} From eb79e443daf95cbf0aa98cdc60c58cebe67d2780 Mon Sep 17 00:00:00 2001 From: abma Date: Fri, 13 Feb 2015 22:58:01 +0100 Subject: [PATCH 2/2] fix compile with undefined STDTHREAD_STRICT_NONRECURSIVE_LOCKS --- mingw.mutex.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mingw.mutex.h b/mingw.mutex.h index a5fdecd..869378c 100644 --- a/mingw.mutex.h +++ b/mingw.mutex.h @@ -78,6 +78,7 @@ class _NonRecursiveMutex: protected B #endif } protected: +#ifdef STDTHREAD_STRICT_NONRECURSIVE_LOCKS void checkSetOwnerAfterLock() { DWORD self = GetCurrentThreadId(); @@ -100,6 +101,7 @@ class _NonRecursiveMutex: protected B } mOwnerThread = 0; } +#endif public: void unlock() {