Merge pull request #6909 from jflyper/bfdev-fix-singed-unsigned-comparison-warning

target/system_stm32f{4,7}xxx.c: Prevent signed and unsigned comparison warning
This commit is contained in:
Andrey Mironov 2018-10-09 09:49:56 +03:00 committed by GitHub
commit a663588dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -505,7 +505,7 @@ void OverclockRebootIfNecessary(uint32_t overclockLevel)
const pllConfig_t * const pll = overclockLevels + overclockLevel;
// Reboot to adjust overclock frequency
if (SystemCoreClock != (pll->n / pll->p) * 1000000) {
if (SystemCoreClock != (pll->n / pll->p) * 1000000U) {
currentOverclockLevel = overclockLevel;
__disable_irq();
NVIC_SystemReset();

View File

@ -281,7 +281,7 @@ void OverclockRebootIfNecessary(uint32_t overclockLevel)
const pllConfig_t * const pll = overclockLevels + overclockLevel;
// Reboot to adjust overclock frequency
if (SystemCoreClock != (pll->n / pll->p) * 1000000) {
if (SystemCoreClock != (pll->n / pll->p) * 1000000U) {
REQUEST_OVERCLOCK = REQUEST_OVERCLOCK_MAGIC_COOKIE;
CURRENT_OVERCLOCK_LEVEL = overclockLevel;
__disable_irq();