diff --git a/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_main_iso.c b/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_main_iso.c index 369609871c6..bf81eb6df21 100644 --- a/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_main_iso.c +++ b/connectivity/FEATURE_BLE/libraries/TARGET_CORDIO_LL/stack/controller/sources/ble/lctr/lctr_main_iso.c @@ -988,7 +988,7 @@ uint8_t LctrIsoReadTestCounter(uint16_t handle, LlIsoTestCtrs_t *pStats) /*************************************************************************************************/ uint8_t LctrIsoTestEnd(uint16_t handle, LlIsoTestCtrs_t *pStats) { - uint8_t status; + uint8_t status = LL_ERROR_CODE_UNSPECIFIED_ERROR; lctrCisCtx_t *pCisCtx; lctrBisCtx_t *pBisCtx; diff --git a/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h b/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h index 07a5f90dad2..3d9d2c8eac6 100755 --- a/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h +++ b/connectivity/cellular/include/cellular/framework/AT/AT_CellularDevice.h @@ -67,7 +67,7 @@ class AT_CellularDevice : public CellularDevice { }; public: - AT_CellularDevice(FileHandle *fh, char *delim = "\r"); + AT_CellularDevice(FileHandle *fh, const char *delim = "\r"); virtual ~AT_CellularDevice(); virtual nsapi_error_t clear(); diff --git a/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp b/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp index e3fd5b551a3..4798576898a 100644 --- a/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp +++ b/connectivity/cellular/source/framework/AT/AT_CellularDevice.cpp @@ -39,7 +39,7 @@ using namespace std::chrono_literals; #define DEFAULT_AT_TIMEOUT 1s // at default timeout const int MAX_SIM_RESPONSE_LENGTH = 16; -AT_CellularDevice::AT_CellularDevice(FileHandle *fh, char *delim): +AT_CellularDevice::AT_CellularDevice(FileHandle *fh, const char *delim): CellularDevice(), _at(fh, _queue, DEFAULT_AT_TIMEOUT, delim), #if MBED_CONF_CELLULAR_USE_SMS diff --git a/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp b/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp index a78e89a062b..75b2fae7d58 100644 --- a/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp +++ b/connectivity/drivers/cellular/GEMALTO/CINTERION/GEMALTO_CINTERION_CellularStack.cpp @@ -444,7 +444,7 @@ nsapi_size_or_error_t GEMALTO_CINTERION_CellularStack::socket_recvfrom_impl(Cell if (address) { char *ip_start = ip_address; char *ip_stop; - char *port_start; + char *port_start = (char *)0xDEADBEEF; if (_stack_type == IPV6_STACK) { ip_start++; // skip '[' ip_stop = strchr(ip_address, ']'); diff --git a/connectivity/nanostack/sal-stack-nanostack/source/6LoWPAN/adaptation_interface.c b/connectivity/nanostack/sal-stack-nanostack/source/6LoWPAN/adaptation_interface.c index 55904778f07..fb7027bf1a3 100644 --- a/connectivity/nanostack/sal-stack-nanostack/source/6LoWPAN/adaptation_interface.c +++ b/connectivity/nanostack/sal-stack-nanostack/source/6LoWPAN/adaptation_interface.c @@ -1554,7 +1554,7 @@ int8_t lowpan_adaptation_interface_tx_confirm(protocol_interface_info_entry_t *c //Check first fragmenter_tx_entry_t *tx_ptr; - bool active_direct_confirm; + bool active_direct_confirm = false; if (lowpan_active_tx_handle_verify(confirm->msduHandle, interface_ptr->active_broadcast_tx_buf.buf)) { active_direct_confirm = true; tx_ptr = &interface_ptr->active_broadcast_tx_buf; diff --git a/platform/source/mbed_board.c b/platform/source/mbed_board.c index 47c92e06145..0f9553fdb14 100644 --- a/platform/source/mbed_board.c +++ b/platform/source/mbed_board.c @@ -28,8 +28,8 @@ WEAK MBED_NORETURN void mbed_die(void) #if !defined(TARGET_EFM32) core_util_critical_section_enter(); #endif - gpio_t led_err; #ifdef LED1 + gpio_t led_err; gpio_init_out(&led_err, LED1); #endif diff --git a/storage/kvstore/tdbstore/source/TDBStore.cpp b/storage/kvstore/tdbstore/source/TDBStore.cpp index 50f490cf370..2003483af69 100644 --- a/storage/kvstore/tdbstore/source/TDBStore.cpp +++ b/storage/kvstore/tdbstore/source/TDBStore.cpp @@ -1490,7 +1490,7 @@ int TDBStore::check_erase_before_write(uint8_t area, uint32_t offset, uint32_t s uint32_t end_offset; while (size) { uint32_t dist, offset_from_start; - int ret; + // int ret; offset_in_erase_unit(area, offset, offset_from_start, dist); uint32_t chunk = std::min(size, dist); diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/spi_api.c b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/spi_api.c index 3cd900edca1..ec4a68886ab 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/spi_api.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/spi_api.c @@ -212,7 +212,7 @@ void spi_get_capabilities(PinName ssel, bool slave, spi_capabilities_t *cap) // check if given ssel pin is in the cs pinmap const PinMap *cs_pins = spi_master_cs_pinmap(); - PinName pin = NC; + // PinName pin = NC; while (cs_pins->pin != NC) { if (cs_pins->pin == ssel) { #if DEVICE_SPISLAVE