Skip to content

Commit 2d7cf60

Browse files
committed
Fix warning about unused mutex
Move the metrics mutex into the ifdef MBED_STACK_STATS_ENABLED since it is not used ouside of it. This fixes the warning: [Warning] greentea_metrics.cpp@37,28: 'mutex' defined but not used [-Wunused-variable]
1 parent a41e08c commit 2d7cf60

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

features/frameworks/greentea-client/source/greentea_metrics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ typedef struct {
3232
uint32_t max_stack;
3333
} thread_info_t;
3434

35+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
3536
// Mutex to protect "buf"
3637
static SingletonPtr<Mutex> mutex;
37-
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
3838
static char buf[128];
3939
static SingletonPtr<CircularBuffer<thread_info_t, THREAD_BUF_COUNT> > queue;
4040
#endif

0 commit comments

Comments
 (0)