Fix undefined behavior

I run cppcheck :)
Shifting *signed* 32-bit value by 31 bits is undefined behaviour.
This commit is contained in:
Emanuele Cesena 2018-10-24 22:03:31 -07:00 committed by GitHub
parent fb93891685
commit a0e0e78551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -89,5 +89,5 @@ void flash_write(uint32_t addr, uint8_t * data, size_t sz)
void flash_lock() void flash_lock()
{ {
FLASH->CR |= (1<<31); FLASH->CR |= (1U<<31);
} }