[waffle] [PATCH 16.1/33] third_party/threads: add missing brackets around _MTX_INITIALIZER_NP

Emil Velikov emil.l.velikov at gmail.com
Tue Jul 22 03:51:05 PDT 2014


... for win32 builds. Spotted by gcc(mingw-w64)

src/waffle/core/wcore_display.c:37:5: warning: missing braces around
initializer [-Wmissing-braces]
     static mtx_t mutex = _MTX_INITIALIZER_NP;
     ^

Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
---
 third_party/threads/threads.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/third_party/threads/threads.h b/third_party/threads/threads.h
index 8317c85..4e7dba2 100644
--- a/third_party/threads/threads.h
+++ b/third_party/threads/threads.h
@@ -57,7 +57,7 @@
 #define TSS_DTOR_ITERATIONS 1
 
 // FIXME: temporary non-standard hack to ease transition
-#define _MTX_INITIALIZER_NP {(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}
+#define _MTX_INITIALIZER_NP {{(PCRITICAL_SECTION_DEBUG)-1, -1, 0, 0, 0, 0}}
 
 /*---------------------------- types ----------------------------*/
 typedef struct cnd_t {
-- 
2.0.0



More information about the waffle mailing list