From a908d73f1f2c910c14fd2caada7f04e8a0c83cce Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 3 Aug 2016 16:24:01 +0200 Subject: [PATCH] Fix gcc 5.4 compiler warnings (#3681) The order preference in flash_driver would evaluate ! before & but I think checking the bit first is what was intended --- radio/src/targets/taranis/flash_driver.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/targets/taranis/flash_driver.cpp b/radio/src/targets/taranis/flash_driver.cpp index 85a51e42f..4a2bae743 100644 --- a/radio/src/targets/taranis/flash_driver.cpp +++ b/radio/src/targets/taranis/flash_driver.cpp @@ -37,7 +37,7 @@ void unlockFlash() void lockFlash() { - while (!FLASH->SR & FLASH_SR_BSY); + while (!(FLASH->SR & FLASH_SR_BSY)); FLASH->CR |= FLASH_CR_LOCK; }