diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp b/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp index 67067b83fb..4492aee531 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/TESTS/cordio_hci/transport/main.cpp @@ -225,23 +225,6 @@ static uint8_t reset_cmd[] = { 0 // parameter length }; -void test_reset_command() -{ - CordioHCIDriver &driver = CordioHCIHook::get_driver(); - CordioHCITransportDriver &transport_driver = CordioHCIHook::get_transport_driver(); - - driver.initialize(); - - CordioHCIHook::set_data_received_handler(hci_driver_rx_reset_handler); - - transport_driver.write(HCI_CMD_TYPE, sizeof(reset_cmd), reset_cmd); - uint32_t events = wait_for_event(); - - TEST_ASSERT_EQUAL(RESET_RECEIVED_FLAG, events); - - driver.terminate(); -} - #define EXPECTED_CONSECUTIVE_RESET 10 void test_multiple_reset_command() @@ -266,7 +249,6 @@ void test_multiple_reset_command() } Case cases[] = { - Case("Test reset command", test_reset_command), Case("Test multiple reset commands", test_multiple_reset_command) }; diff --git a/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c b/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c index b56ac23df1..47bbd2b723 100644 --- a/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c +++ b/features/lwipstack/lwip/src/core/ipv4/lwip_ip4_frag.c @@ -206,9 +206,8 @@ ip_reass_free_complete_datagram(struct ip_reassdata *ipr, struct ip_reassdata *p pbuf_free(pcur); } /* Then, unchain the struct ip_reassdata from the list and free it. */ - if (prev != NULL) { - ip_reass_dequeue_datagram(ipr, prev); - } + /* coverity [FORWARD_NULL]*/ + ip_reass_dequeue_datagram(ipr, prev); LWIP_ASSERT("ip_reass_pbufcount >= pbufs_freed", ip_reass_pbufcount >= pbufs_freed); ip_reass_pbufcount = (u16_t)(ip_reass_pbufcount - pbufs_freed); @@ -662,9 +661,8 @@ ip4_reass(struct pbuf *p) } /* release the sources allocate for the fragment queue entry */ - if (ipr_prev != NULL) { - ip_reass_dequeue_datagram(ipr, ipr_prev); - } + /* coverity [FORWARD_NULL]*/ + ip_reass_dequeue_datagram(ipr, ipr_prev); /* and adjust the number of pbufs currently queued for reassembly. */ clen = pbuf_clen(p); LWIP_ASSERT("ip_reass_pbufcount >= clen", ip_reass_pbufcount >= clen); diff --git a/features/netsocket/NetworkInterface.h b/features/netsocket/NetworkInterface.h index 117ea14cd2..40724a9d74 100644 --- a/features/netsocket/NetworkInterface.h +++ b/features/netsocket/NetworkInterface.h @@ -308,7 +308,7 @@ public: * By default, interfaces are in synchronous mode which means that * connect() or disconnect() blocks until it reach the target state or requested operation fails. * - * @param blocking Use true to set NetworkInterface in asynchronous mode. + * @param blocking Use false to set NetworkInterface in asynchronous mode. * @return NSAPI_ERROR_OK on success * @return NSAPI_ERROR_UNSUPPORTED if driver does not support asynchronous mode. * @return negative error code on failure. diff --git a/features/storage/kvstore/conf/kv_config.cpp b/features/storage/kvstore/conf/kv_config.cpp index a69ca94a7d..303545db03 100644 --- a/features/storage/kvstore/conf/kv_config.cpp +++ b/features/storage/kvstore/conf/kv_config.cpp @@ -388,7 +388,7 @@ BlockDevice *_get_blockdevice_FLASHIAP(bd_addr_t start_address, bd_size_t size) } if (size == 0) { - //The block device will have all space form start address to the end of the flash + //The block device will have all space from start address to the end of the flash size = (flash_end_address - start_address); static FlashIAPBlockDevice bd(start_address, size); @@ -486,12 +486,12 @@ BlockDevice *_get_blockdevice_QSPIF(bd_addr_t start_address, bd_size_t size) bd_addr_t aligned_start_address; static QSPIFBlockDevice bd( - QSPI_FLASH1_IO0, - QSPI_FLASH1_IO1, - QSPI_FLASH1_IO2, - QSPI_FLASH1_IO3, - QSPI_FLASH1_SCK, - QSPI_FLASH1_CSN, + MBED_CONF_QSPIF_QSPI_IO0, + MBED_CONF_QSPIF_QSPI_IO1, + MBED_CONF_QSPIF_QSPI_IO2, + MBED_CONF_QSPIF_QSPI_IO3, + MBED_CONF_QSPIF_QSPI_SCK, + MBED_CONF_QSPIF_QSPI_CSN, QSPIF_POLARITY_MODE_0, MBED_CONF_QSPIF_QSPI_FREQ ); diff --git a/features/storage/kvstore/tdbstore/TDBStore.cpp b/features/storage/kvstore/tdbstore/TDBStore.cpp index eda5867e20..5b04d553bd 100644 --- a/features/storage/kvstore/tdbstore/TDBStore.cpp +++ b/features/storage/kvstore/tdbstore/TDBStore.cpp @@ -614,7 +614,7 @@ int TDBStore::set_finalize(set_handle_t handle) goto end; } - // Writes may fail without returning a failure (specially in flash components). Reread the record + // Writes may fail without returning a failure (especially in flash components). Reread the record // to ensure write success (this won't read the data anywhere - just use the CRC calculation). ret = read_record(_active_area, ih->bd_base_offset, 0, 0, (uint32_t) -1, actual_data_size, 0, false, false, false, false, @@ -1061,7 +1061,7 @@ int TDBStore::init() // (this will do nothing if already erased) if (ret == MBED_ERROR_INVALID_DATA_DETECTED) { if (check_erase_before_write(area, _master_record_offset, _master_record_size, true)) { - MBED_ERROR(MBED_ERROR_READ_FAILED, "TDBSTORE: Unable reset area at init"); + MBED_ERROR(MBED_ERROR_READ_FAILED, "TDBSTORE: Unable to reset area at init"); } area_state[area] = TDBSTORE_AREA_STATE_EMPTY; continue; diff --git a/platform/source/mbed_error.c b/platform/source/mbed_error.c index 3ffc22f5b1..8e9b81c6de 100644 --- a/platform/source/mbed_error.c +++ b/platform/source/mbed_error.c @@ -139,8 +139,8 @@ static mbed_error_status_t handle_error(mbed_error_status_t error_status, unsign //Error status should always be < 0 if (error_status >= 0) { - //This is a weird situation, someone called mbed_error with invalid error code. - //We will still handle the situation but change the error code to ERROR_INVALID_ARGUMENT, atleast the context will have info on who called it + //This is a weird situation, someone called mbed_error with an invalid error code. + //We will still handle the situation but change the error code to ERROR_INVALID_ARGUMENT, at least the context will have info on who called it error_status = MBED_ERROR_INVALID_ARGUMENT; } diff --git a/targets/TARGET_STM/TARGET_STM32L4/TARGET_MTS_DRAGONFLY_L471QG/PeripheralPins.c b/targets/TARGET_STM/TARGET_STM32L4/TARGET_MTS_DRAGONFLY_L471QG/PeripheralPins.c index d27086691c..c7454b67b4 100644 --- a/targets/TARGET_STM/TARGET_STM32L4/TARGET_MTS_DRAGONFLY_L471QG/PeripheralPins.c +++ b/targets/TARGET_STM/TARGET_STM32L4/TARGET_MTS_DRAGONFLY_L471QG/PeripheralPins.c @@ -44,6 +44,7 @@ MBED_WEAK const PinMap PinMap_ADC[] = { {PA_1, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 6, 0)}, // IN6 - ARDUINO D6 {PA_2, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 7, 0)}, // IN7 // PA_2 is used as SERIAL_TX {PA_3, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 8, 0)}, // IN8 // PA_3 is used as SERIAL_RX + {PA_6, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 11, 0)}, // IN11 {PA_7, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 12, 0)}, // IN12 {PB_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 15, 0)}, // IN15 - ARDUINO D8 {PC_0, ADC_1, STM_PIN_DATA_EXT(STM_MODE_ANALOG_ADC_CONTROL, GPIO_NOPULL, 0, 1, 0)}, // IN1 diff --git a/targets/targets.json b/targets/targets.json index 78e4170cb4..61a3735217 100644 --- a/targets/targets.json +++ b/targets/targets.json @@ -1314,6 +1314,7 @@ "SPI", "SPISLAVE", "STDIO_MESSAGES", + "USBDEVICE", "FLASH" ], "release_versions": ["2", "5"], @@ -2824,7 +2825,7 @@ "default_toolchain": "uARM", "extra_labels_add": ["STM32F4", "STM32F411xE", "STM32F411RE"], "supported_toolchains": ["ARM", "uARM", "GCC_ARM"], - "detect_code": ["----"], + "detect_code": ["0410"], "device_has_add": ["MPU"], "device_has_remove": ["SERIAL_FC"], "default_lib": "small", @@ -8860,15 +8861,11 @@ "PORTINOUT", "PORTOUT", "PWMOUT", - "RTC", "SERIAL", "SLEEP", "SPI", - "SPISLAVE", - "SPI_ASYNCH", "I2C", "I2CSLAVE", - "I2C_ASYNCH", "STDIO_MESSAGES", "MPU" ],