id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 7434,"Lock used in flyweight causes erroneous ""unused variable"" warning when compiling with clang",Pierre Imai ,Joaquín M López Muñoz,"The lock functionality in boost/flyweight/detail/flyweight_core.hpp causes the following warning when compiled with ""Apple clang version 4.0 (tags/Apple/clang-421.0.60) (based on LLVM 3.1svn)"" with option ""-Wunused-variable"": {{{ In file included from /opt/local/include/boost/flyweight/flyweight.hpp:22: /opt/local/include/boost/flyweight/detail/flyweight_core.hpp:189:22: error: unused variable 'lock' [-Werror,-Wunused-variable] lock_type lock(mutex()); }}} This problem can be fixed by adding the following code to the file, before / after the corresponding blocks for MSVC {{{ #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored ""-Wunused-variable"" #endif }}} {{{ #ifdef __clang__ #pragma clang diagnostic pop #endif }}} ",Bugs,closed,To Be Determined,flyweight,Boost 1.51.0,Problem,wontfix,clang unused variable warning,