diff --git a/UNITTESTS/stubs/FileHandle_stub.h b/UNITTESTS/stubs/FileHandle_stub.h index af8c6cc2b17..5dacb0b4594 100644 --- a/UNITTESTS/stubs/FileHandle_stub.h +++ b/UNITTESTS/stubs/FileHandle_stub.h @@ -67,6 +67,7 @@ class FileHandle_stub : public FileHandle { 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 f8fd1b699d2..f65362bcde7 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 083115d38a4..22895fe246e 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 e67c84bfdaf..54d07306525 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 125e57ce1ef..5b6a068c4af 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 ff2192e7296..9b9fe834777 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 304e342d3f2..42c81f519a7 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 @@ -153,6 +153,8 @@ class my_AT_CTXIPV6 : public AT_CellularContext { 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 8edee42f0c6..4e5b540e610 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 6220649ec5d..3664d40cf06 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 @@ class my_radio : public LoRaRadio { virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -105,6 +106,7 @@ class my_radio : public LoRaRadio { 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 47e9b762123..8b4054c71e1 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 @@ class my_radio : public LoRaRadio { virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ class my_radio : public LoRaRadio { 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 93ff3d29e08..36bec40536b 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 @@ class my_radio : public LoRaRadio { virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ class my_radio : public LoRaRadio { 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 20e8fc3be2a..967a855cdd1 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 @@ class my_radio : public LoRaRadio { virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ class my_radio : public LoRaRadio { 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 5a170a1f29c..c38ddcf06f7 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 @@ class my_radio : public LoRaRadio { 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 @@ class my_radio : public LoRaRadio { 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 82d9e7b6851..d367b22edca 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 @@ class my_radio : public LoRaRadio { virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -88,6 +89,7 @@ class my_radio : public LoRaRadio { 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 f4506a815cd..75dbb6c3475 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 @@ class my_radio : public LoRaRadio { 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 @@ class my_radio : public LoRaRadio { 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 @@ class my_radio : public LoRaRadio { int16_t rssi_threshold, uint32_t max_carrier_sense_time) { + return true; }; virtual void start_cad(void) @@ -101,6 +105,7 @@ class my_radio : public LoRaRadio { 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 589e95b51f0..13aca435fb1 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 @@ class my_radio : public LoRaRadio { virtual uint32_t random(void) { + return 4; }; virtual uint8_t get_status(void) @@ -114,6 +115,7 @@ class my_radio : public LoRaRadio { 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,