Skip to content

Commit 75cf250

Browse files
authored
Merge pull request #2818 from pan-/fix_test_tools_warnings
TESTS TOOLS - fix warnings
2 parents 4a65580 + 8070468 commit 75cf250

File tree

6 files changed

+9
-6
lines changed

6 files changed

+9
-6
lines changed

features/frameworks/greentea-client/greentea-client/greentea_serial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ class GreenteaSerial : public mbed::RawSerial {
1010
};
1111

1212
extern SingletonPtr<GreenteaSerial> greentea_serial;
13-
#endif
13+
#endif

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,13 @@ typedef struct {
3535

3636
// Mutex to protect "buf"
3737
SingletonPtr<Mutex> mutex;
38+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
3839
static char buf[128];
3940
static SingletonPtr<CircularBuffer<thread_info_t, THREAD_BUF_COUNT> > queue;
41+
#endif
4042

4143
static void send_heap_info(void);
44+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
4245
static void send_stack_info(void);
4346
static void on_thread_terminate(osThreadId id);
4447
static void enqeue_thread_info(osThreadId id);
@@ -47,6 +50,7 @@ static void deque_and_print_thread_info(void);
4750
// sprintf uses a lot of stack so use these instead
4851
static uint32_t print_hex(char *buf, uint32_t value);
4952
static uint32_t print_dec(char *buf, uint32_t value);
53+
#endif
5054

5155
void greentea_metrics_setup()
5256
{
@@ -71,6 +75,7 @@ static void send_heap_info()
7175
greentea_send_kv("max_heap_usage",heap_stats.max_size);
7276
}
7377

78+
#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED
7479
MBED_UNUSED static void send_stack_info()
7580
{
7681
mutex->lock();
@@ -205,3 +210,5 @@ static uint32_t print_dec(char *buf, uint32_t value)
205210

206211
return pos;
207212
}
213+
214+
#endif

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
SingletonPtr<GreenteaSerial> greentea_serial;
44

5-
GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {};
5+
GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {};

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -574,7 +574,6 @@ int greentea_parse_kv(char *out_key,
574574
break;
575575
}
576576
}
577-
return 0;
578577
}
579578

580579
/**

features/frameworks/utest/source/utest_harness.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ bool Harness::run(const Specification& specification)
144144
if (handlers->test_teardown) handlers->test_teardown(0, 0, failure);
145145
test_cases = NULL;
146146
exit(1);
147-
return true;
148147
}
149148

150149
notify_testcases();
@@ -159,7 +158,6 @@ bool Harness::run(const Specification& specification)
159158
if (handlers->test_teardown) handlers->test_teardown(0, 0, failure);
160159
test_cases = NULL;
161160
exit(1);
162-
return true;
163161
}
164162
return true;
165163
}

features/frameworks/utest/source/utest_shim.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ static int32_t utest_us_ticker_run()
123123
callback();
124124
}
125125
}
126-
return 0;
127126
}
128127

129128

0 commit comments

Comments
 (0)