Opened 10 years ago
Closed 3 years ago
#7434 closed Bugs (wontfix)
Lock used in flyweight causes erroneous "unused variable" warning when compiling with clang
Reported by: | Owned by: | Joaquín M López Muñoz | |
---|---|---|---|
Milestone: | To Be Determined | Component: | flyweight |
Version: | Boost 1.51.0 | Severity: | Problem |
Keywords: | clang unused variable warning | Cc: |
Description
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
Change History (2)
comment:1 by , 9 years ago
comment:2 by , 3 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Can't fix due to lack of feedback from reporter.
Note:
See TracTickets
for help on using tickets.
Hi Pierre,
Can you provide me with two bits of additional info?
Thank you,