diff --git a/features/frameworks/greentea-client/greentea-client/greentea_serial.h b/features/frameworks/greentea-client/greentea-client/greentea_serial.h index 9adba96e5c..056c61cb27 100644 --- a/features/frameworks/greentea-client/greentea-client/greentea_serial.h +++ b/features/frameworks/greentea-client/greentea-client/greentea_serial.h @@ -10,4 +10,4 @@ public: }; extern SingletonPtr greentea_serial; -#endif \ No newline at end of file +#endif diff --git a/features/frameworks/greentea-client/source/greentea_metrics.cpp b/features/frameworks/greentea-client/source/greentea_metrics.cpp index 0dc700ec08..2491a0de91 100644 --- a/features/frameworks/greentea-client/source/greentea_metrics.cpp +++ b/features/frameworks/greentea-client/source/greentea_metrics.cpp @@ -35,10 +35,13 @@ typedef struct { // Mutex to protect "buf" SingletonPtr mutex; +#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED static char buf[128]; static SingletonPtr > queue; +#endif static void send_heap_info(void); +#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED static void send_stack_info(void); static void on_thread_terminate(osThreadId id); static void enqeue_thread_info(osThreadId id); @@ -47,6 +50,7 @@ static void deque_and_print_thread_info(void); // sprintf uses a lot of stack so use these instead static uint32_t print_hex(char *buf, uint32_t value); static uint32_t print_dec(char *buf, uint32_t value); +#endif void greentea_metrics_setup() { @@ -71,6 +75,7 @@ static void send_heap_info() greentea_send_kv("max_heap_usage",heap_stats.max_size); } +#if defined(MBED_STACK_STATS_ENABLED) && MBED_STACK_STATS_ENABLED MBED_UNUSED static void send_stack_info() { mutex->lock(); @@ -205,3 +210,5 @@ static uint32_t print_dec(char *buf, uint32_t value) return pos; } + +#endif diff --git a/features/frameworks/greentea-client/source/greentea_serial.cpp b/features/frameworks/greentea-client/source/greentea_serial.cpp index ee9f31b58f..009b67fd36 100644 --- a/features/frameworks/greentea-client/source/greentea_serial.cpp +++ b/features/frameworks/greentea-client/source/greentea_serial.cpp @@ -2,4 +2,4 @@ SingletonPtr greentea_serial; -GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {}; \ No newline at end of file +GreenteaSerial::GreenteaSerial() : mbed::RawSerial(USBTX, USBRX) {}; diff --git a/features/frameworks/greentea-client/source/test_env.cpp b/features/frameworks/greentea-client/source/test_env.cpp index 3fb1e9cd3c..c0a69a8a79 100644 --- a/features/frameworks/greentea-client/source/test_env.cpp +++ b/features/frameworks/greentea-client/source/test_env.cpp @@ -574,7 +574,6 @@ int greentea_parse_kv(char *out_key, break; } } - return 0; } /** diff --git a/features/frameworks/utest/source/utest_harness.cpp b/features/frameworks/utest/source/utest_harness.cpp index 52b8513bcd..2a020c6899 100644 --- a/features/frameworks/utest/source/utest_harness.cpp +++ b/features/frameworks/utest/source/utest_harness.cpp @@ -144,7 +144,6 @@ bool Harness::run(const Specification& specification) if (handlers->test_teardown) handlers->test_teardown(0, 0, failure); test_cases = NULL; exit(1); - return true; } notify_testcases(); @@ -159,7 +158,6 @@ bool Harness::run(const Specification& specification) if (handlers->test_teardown) handlers->test_teardown(0, 0, failure); test_cases = NULL; exit(1); - return true; } return true; } diff --git a/features/frameworks/utest/source/utest_shim.cpp b/features/frameworks/utest/source/utest_shim.cpp index 6b5ab7596a..07a1f82f80 100644 --- a/features/frameworks/utest/source/utest_shim.cpp +++ b/features/frameworks/utest/source/utest_shim.cpp @@ -123,7 +123,6 @@ static int32_t utest_us_ticker_run() callback(); } } - return 0; }