Skip to content
Snippets Groups Projects
Commit 92370e84 authored by Joakim Nohlgård's avatar Joakim Nohlgård
Browse files

sys/cpp11-compat: Add braces around mutex initializer

Fixes Clang warning/error:

    In file included from .../riot/sys/cpp11-compat/thread.cpp:26:
    In file included from .../riot/sys/cpp11-compat/include/riot/thread.hpp:39:
    .../riot/sys/cpp11-compat/include/riot/mutex.hpp:47:45: error:
     suggest braces around initialization of subobject [-Werror,-Wmissing-braces]
      inline constexpr mutex() noexcept : m_mtx{0} {}
                                                ^
                                                {}
    1 error generated.
parent 73739cb7
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ class mutex { ...@@ -44,7 +44,7 @@ class mutex {
public: public:
using native_handle_type = mutex_t*; using native_handle_type = mutex_t*;
inline constexpr mutex() noexcept : m_mtx{0} {} inline constexpr mutex() noexcept : m_mtx{{0}} {}
~mutex(); ~mutex();
void lock(); void lock();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment