diff --git a/UNITTESTS/stubs/FileHandle_stub.h b/UNITTESTS/stubs/FileHandle_stub.h index af8c6cc2b1..5dacb0b459 100644 --- a/UNITTESTS/stubs/FileHandle_stub.h +++ b/UNITTESTS/stubs/FileHandle_stub.h @@ -67,6 +67,7 @@ public: virtual int close() { + return 0; } virtual short poll(short events) const diff --git a/UNITTESTS/stubs/connectivity/AT_CellularDevice_stub.cpp b/UNITTESTS/stubs/connectivity/AT_CellularDevice_stub.cpp index f8fd1b699d..f65362bcde 100644 --- a/UNITTESTS/stubs/connectivity/AT_CellularDevice_stub.cpp +++ b/UNITTESTS/stubs/connectivity/AT_CellularDevice_stub.cpp @@ -56,6 +56,7 @@ ATHandler *AT_CellularDevice::get_at_handler() CellularContext *create_context(const char *apn) { + return nullptr; } void delete_context(CellularContext *context) diff --git a/UNITTESTS/stubs/connectivity/LoRaMac_stub.cpp b/UNITTESTS/stubs/connectivity/LoRaMac_stub.cpp index 083115d38a..22895fe246 100644 --- a/UNITTESTS/stubs/connectivity/LoRaMac_stub.cpp +++ b/UNITTESTS/stubs/connectivity/LoRaMac_stub.cpp @@ -94,6 +94,7 @@ void LoRaMac::post_process_mlme_ind() lorawan_time_t LoRaMac::get_current_time(void) { + return 0; } rx_slot_t LoRaMac::get_current_slot(void) diff --git a/UNITTESTS/stubs/drivers/BufferedSerial_stub.cpp b/UNITTESTS/stubs/drivers/BufferedSerial_stub.cpp index e67c84bfda..54d0730652 100644 --- a/UNITTESTS/stubs/drivers/BufferedSerial_stub.cpp +++ b/UNITTESTS/stubs/drivers/BufferedSerial_stub.cpp @@ -85,6 +85,7 @@ ssize_t BufferedSerial::write_unbuffered(const char *buf_ptr, size_t length) bool BufferedSerial::hup() const { + return false; } void BufferedSerial::wake() diff --git a/UNITTESTS/stubs/events/equeue_stub.c b/UNITTESTS/stubs/events/equeue_stub.c index 125e57ce1e..5b6a068c4a 100644 --- a/UNITTESTS/stubs/events/equeue_stub.c +++ b/UNITTESTS/stubs/events/equeue_stub.c @@ -105,7 +105,7 @@ void equeue_background(equeue_t *queue, int equeue_chain(equeue_t *queue, equeue_t *target) { - + return 0; } int equeue_call_in(equeue_t *q, int ms, void (*cb)(void *), void *data) diff --git a/UNITTESTS/stubs/storage/EmulatedSD.cpp b/UNITTESTS/stubs/storage/EmulatedSD.cpp index ff2192e729..9b9fe83477 100644 --- a/UNITTESTS/stubs/storage/EmulatedSD.cpp +++ b/UNITTESTS/stubs/storage/EmulatedSD.cpp @@ -62,6 +62,7 @@ int EmulatedSD::deinit() { fclose(_p->fs); _p->fs = nullptr; + return 0; } int EmulatedSD::read(void *buffer, bd_addr_t addr, bd_size_t size) diff --git a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/at_cellularcontexttest.cpp b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/at_cellularcontexttest.cpp index 304e342d3f..eb0a2a0459 100644 --- a/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/at_cellularcontexttest.cpp +++ b/connectivity/cellular/tests/UNITTESTS/framework/AT/at_cellularcontext/at_cellularcontexttest.cpp @@ -58,10 +58,8 @@ protected: ATHandler_stub::call_immediately = false; ATHandler_stub::resp_info_true_counter = false; ATHandler_stub::info_elem_true_counter = false; - ATHandler_stub::int_valid_count_table[kRead_int_table_size]; ATHandler_stub::int_count = kRead_int_table_size; ATHandler_stub::read_string_index = kRead_string_table_size; - ATHandler_stub::read_string_table[kRead_string_table_size]; ATHandler_stub::resp_stop_success_count = kResp_stop_count_default; CellularDevice_stub::connect_counter = 2; @@ -153,6 +151,8 @@ public: if (!_stack) { _stack = new my_stack(_at, *get_device()); } + + return _stack; } virtual uint32_t get_timeout_for_operation(ContextOperation op) const { diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loramac/Test_LoRaMac.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loramac/Test_LoRaMac.cpp index 8edee42f0c..4e5b540e61 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loramac/Test_LoRaMac.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loramac/Test_LoRaMac.cpp @@ -537,7 +537,7 @@ TEST_F(Test_LoRaMac, post_process_mlme_ind) uint8_t batt_cb() { - + return 100; } TEST_F(Test_LoRaMac, set_batterylevel_callback) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp index 6220649ec5..3664d40cf0 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphy/Test_LoRaPHY.cpp @@ -88,6 +88,7 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -105,6 +106,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp index 47e9b76212..8b4054c71e 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp @@ -71,6 +71,7 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp index 93ff3d29e0..36bec40536 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp @@ -71,6 +71,7 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp index 20e8fc3be2..967a855cdd 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp @@ -71,6 +71,7 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp index 5a170a1f29..c38ddcf06f 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp @@ -71,10 +71,12 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) { + return 0; }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) @@ -87,6 +89,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp index 82d9e7b685..d367b22edc 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp @@ -71,6 +71,7 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp index f4506a815c..75dbb6c347 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawaninterface/Test_LoRaWANInterface.cpp @@ -70,10 +70,12 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) { + return 0; }; virtual void set_max_payload_length(radio_modems_t modem, uint8_t max) @@ -86,6 +88,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem, @@ -93,6 +96,7 @@ public: int16_t rssi_threshold, uint32_t max_carrier_sense_time) { + return true; }; virtual void start_cad(void) @@ -101,6 +105,7 @@ public: virtual bool check_rf_frequency(uint32_t frequency) { + return true; }; virtual void set_tx_continuous_wave(uint32_t freq, int8_t power, uint16_t time) diff --git a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp index 589e95b51f..13aca435fb 100644 --- a/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp +++ b/connectivity/lorawan/tests/UNITTESTS/features/lorawan/lorawanstack/Test_LoRaWANStack.cpp @@ -97,6 +97,7 @@ public: virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -114,6 +115,7 @@ public: virtual uint32_t time_on_air(radio_modems_t modem, uint8_t pkt_len) { + return 0; }; virtual bool perform_carrier_sense(radio_modems_t modem,