mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			Merge pull request #11494 from hugueskamba/hk-fix-coverity-iotcore-1334
Fix Coverity issue: Initialize FlashIAP non-static member in constructorpull/11561/head
						commit
						07ebd92f7b
					
				| 
						 | 
					@ -63,8 +63,10 @@ namespace mbed {
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
class FlashIAP : private NonCopyable<FlashIAP> {
 | 
					class FlashIAP : private NonCopyable<FlashIAP> {
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
    FlashIAP();
 | 
					    constexpr FlashIAP() : _flash(), _page_buf(nullptr)
 | 
				
			||||||
    ~FlashIAP();
 | 
					    {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /** Initialize a flash IAP device
 | 
					    /** Initialize a flash IAP device
 | 
				
			||||||
     *
 | 
					     *
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -46,16 +46,6 @@ static inline bool is_aligned(uint32_t number, uint32_t alignment)
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FlashIAP::FlashIAP() : _page_buf(nullptr)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
FlashIAP::~FlashIAP()
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
int FlashIAP::init()
 | 
					int FlashIAP::init()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    int ret = 0;
 | 
					    int ret = 0;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -172,11 +172,11 @@ protected:
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Disallow construction of NonCopyable objects from outside of its hierarchy.
 | 
					     * Disallow construction of NonCopyable objects from outside of its hierarchy.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    NonCopyable() { }
 | 
					    NonCopyable() = default;
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
     * Disallow destruction of NonCopyable objects from outside of its hierarchy.
 | 
					     * Disallow destruction of NonCopyable objects from outside of its hierarchy.
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    ~NonCopyable() { }
 | 
					    ~NonCopyable() = default;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0))
 | 
					#if (!defined(MBED_DEBUG) && (MBED_CONF_PLATFORM_FORCE_NON_COPYABLE_ERROR == 0))
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue