Merge pull request #12345 from VeijoPesonen/fix_compiler_warnings

USBMSD; NFCEEPROM; mbed_compat: Fix compiler warnings
pull/12472/head
Martin Kojtal 2020-02-03 16:59:35 +00:00 committed by GitHub
commit 62cc4ece8d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 8 deletions

View File

@ -67,8 +67,11 @@ enum Status {
USBMSD::USBMSD(BlockDevice *bd, bool connect_blocking, uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
: USBDevice(get_usb_phy(), vendor_id, product_id, product_release),
_initialized(false), _media_removed(false), _in_task(&_queue), _out_task(&_queue), _reset_task(&_queue), _control_task(&_queue), _configure_task(&_queue), _bd(bd),
_addr(0), _length(0), _mem_ok(false), _block_size(0), _memory_size(0), _block_count(0), _out_ready(false), _in_ready(false), _bulk_out_size(0)
_initialized(false), _media_removed(false),
_addr(0), _length(0), _mem_ok(false), _block_size(0), _memory_size(0), _block_count(0),
_out_ready(false), _in_ready(false), _bulk_out_size(0),
_in_task(&_queue), _out_task(&_queue), _reset_task(&_queue), _control_task(&_queue),
_configure_task(&_queue), _bd(bd)
{
_init();
if (connect_blocking) {
@ -80,8 +83,11 @@ USBMSD::USBMSD(BlockDevice *bd, bool connect_blocking, uint16_t vendor_id, uint1
USBMSD::USBMSD(USBPhy *phy, BlockDevice *bd, uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
: USBDevice(phy, vendor_id, product_id, product_release),
_initialized(false), _media_removed(false), _in_task(&_queue), _out_task(&_queue), _reset_task(&_queue), _control_task(&_queue), _configure_task(&_queue), _bd(bd),
_addr(0), _length(0), _mem_ok(false), _block_size(0), _memory_size(0), _block_count(0), _out_ready(false), _in_ready(false), _bulk_out_size(0)
_initialized(false), _media_removed(false),
_addr(0), _length(0), _mem_ok(false), _block_size(0), _memory_size(0), _block_count(0),
_out_ready(false), _in_ready(false), _bulk_out_size(0),
_in_task(&_queue), _out_task(&_queue), _reset_task(&_queue), _control_task(&_queue),
_configure_task(&_queue), _bd(bd)
{
_init();
}

View File

@ -20,9 +20,11 @@
using namespace mbed;
using namespace mbed::nfc;
NFCEEPROM::NFCEEPROM(NFCEEPROMDriver *driver, events::EventQueue *queue, const Span<uint8_t> &ndef_buffer) : NFCTarget(ndef_buffer),
_delegate(NULL), _driver(driver), _event_queue(queue), _initialized(false), _current_op(nfc_eeprom_idle), _ndef_buffer_read_sz(0), _eeprom_address(0),
_operation_result(NFC_ERR_UNKNOWN), _ndef_buffer_reader{nullptr, 0, nullptr}
NFCEEPROM::NFCEEPROM(NFCEEPROMDriver *driver, events::EventQueue *queue, const Span<uint8_t> &ndef_buffer)
:
NFCTarget(ndef_buffer), _delegate(NULL), _driver(driver), _event_queue(queue), _initialized(false),
_current_op(nfc_eeprom_idle), _ndef_buffer_reader { nullptr, 0, nullptr }, _ndef_buffer_read_sz(0),
_eeprom_address(0), _operation_result(NFC_ERR_UNKNOWN)
{
_driver->set_delegate(this);
_driver->set_event_queue(queue);

View File

@ -80,7 +80,6 @@ MBED_WEAK void spi_get_capabilities(PinName ssel, bool slave, spi_capabilities_t
// check if given ssel pin is in the cs pinmap
const PinMap *cs_pins = spi_master_cs_pinmap();
PinName pin = NC;
while (cs_pins->pin != NC) {
if (cs_pins->pin == ssel) {
#if DEVICE_SPISLAVE