mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Fix warnings in block devices
							parent
							
								
									a0a9b54e97
								
							
						
					
					
						commit
						dd065e3be1
					
				| 
						 | 
				
			
			@ -461,7 +461,7 @@ bd_size_t SPIFBlockDevice::get_erase_size(bd_addr_t addr)
 | 
			
		|||
bd_size_t SPIFBlockDevice::size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return SPIF_BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _device_size_bytes;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -251,7 +251,7 @@ bd_size_t BufferedBlockDevice::get_program_size() const
 | 
			
		|||
bd_size_t BufferedBlockDevice::get_erase_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_erase_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -260,7 +260,7 @@ bd_size_t BufferedBlockDevice::get_erase_size() const
 | 
			
		|||
bd_size_t BufferedBlockDevice::get_erase_size(bd_addr_t addr) const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_erase_size(addr);
 | 
			
		||||
| 
						 | 
				
			
			@ -278,7 +278,7 @@ int BufferedBlockDevice::get_erase_value() const
 | 
			
		|||
bd_size_t BufferedBlockDevice::size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->size();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -254,7 +254,7 @@ bd_size_t ChainingBlockDevice::get_erase_size() const
 | 
			
		|||
bd_size_t ChainingBlockDevice::get_erase_size(bd_addr_t addr) const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    bd_addr_t bd_start_addr = 0;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -142,7 +142,7 @@ int ExhaustibleBlockDevice::erase(bd_addr_t addr, bd_size_t size)
 | 
			
		|||
bd_size_t ExhaustibleBlockDevice::get_read_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_read_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -151,7 +151,7 @@ bd_size_t ExhaustibleBlockDevice::get_read_size() const
 | 
			
		|||
bd_size_t ExhaustibleBlockDevice::get_program_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_program_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -160,7 +160,7 @@ bd_size_t ExhaustibleBlockDevice::get_program_size() const
 | 
			
		|||
bd_size_t ExhaustibleBlockDevice::get_erase_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_erase_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -169,7 +169,7 @@ bd_size_t ExhaustibleBlockDevice::get_erase_size() const
 | 
			
		|||
bd_size_t ExhaustibleBlockDevice::get_erase_size(bd_addr_t addr) const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_erase_size(addr);
 | 
			
		||||
| 
						 | 
				
			
			@ -187,7 +187,7 @@ int ExhaustibleBlockDevice::get_erase_value() const
 | 
			
		|||
bd_size_t ExhaustibleBlockDevice::size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->size();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -96,7 +96,7 @@ int FlashSimBlockDevice::sync()
 | 
			
		|||
bd_size_t FlashSimBlockDevice::get_read_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_read_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -105,7 +105,7 @@ bd_size_t FlashSimBlockDevice::get_read_size() const
 | 
			
		|||
bd_size_t FlashSimBlockDevice::get_program_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_program_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -114,7 +114,7 @@ bd_size_t FlashSimBlockDevice::get_program_size() const
 | 
			
		|||
bd_size_t FlashSimBlockDevice::get_erase_size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_erase_size();
 | 
			
		||||
| 
						 | 
				
			
			@ -123,7 +123,7 @@ bd_size_t FlashSimBlockDevice::get_erase_size() const
 | 
			
		|||
bd_size_t FlashSimBlockDevice::get_erase_size(bd_addr_t addr) const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->get_erase_size(addr);
 | 
			
		||||
| 
						 | 
				
			
			@ -132,7 +132,7 @@ bd_size_t FlashSimBlockDevice::get_erase_size(bd_addr_t addr) const
 | 
			
		|||
bd_size_t FlashSimBlockDevice::size() const
 | 
			
		||||
{
 | 
			
		||||
    if (!_is_initialized) {
 | 
			
		||||
        return BD_ERROR_DEVICE_ERROR;
 | 
			
		||||
        return 0;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return _bd->size();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue