Merge pull request #134 from riscv/compile

Fix compile warning with gcc 6.3.0
macbuild
Tim Newsome 2017-11-01 11:04:23 -07:00 committed by GitHub
commit 8304e1ba47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1321,7 +1321,7 @@ COMMAND_HANDLER(stm32x_handle_unlock_command)
* this will also force a device unlock if set */
stm32x_info->option_bytes.RDP = 0xAA;
if (stm32x_info->has_optcr2_pcrop) {
stm32x_info->option_bytes.optcr2_pcrop = OPTCR2_PCROP_RDP | (~1 << bank->num_sectors);
stm32x_info->option_bytes.optcr2_pcrop = OPTCR2_PCROP_RDP | (~1U << bank->num_sectors);
}
if (stm32x_write_options(bank) != ERROR_OK) {