Skip to content

VECGEOM-35 Proper use of ATOMIC_FLAG_INIT

Philippe Canal requested to merge warning into master

ATOMIC_FLAG_INIT is to be used for initialization via assignement.

See http://en.cppreference.com/w/cpp/atomic/atomic_flag

Otherwise you get warnings like:

TLS.h:135:31 warning: braces around scalar initializer [-Wbraced-scalar-init] static std::atomic_flag gLock(ATOMIC_FLAG_INIT); ^~~~~~~~~~~~~~~~ ...../include/c++/v1/atomic:1779:26: note: expanded from macro 'ATOMIC_FLAG_INIT' #define ATOMIC_FLAG_INIT {false} ^~~~~~~

on some platforms.

Merge request reports