aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2017-11-01 11:04:23 -0700
committerGitHub <noreply@github.com>2017-11-01 11:04:23 -0700
commit8304e1ba47caf18d4ce1c0e177976b092355aee1 (patch)
tree125f637ccf3edc3ab06357cef24bc5cc7c4d4c75
parent40c97cc476f4b9da0703a36ec6fb635c1b3b431c (diff)
parent6a1690d2ec1a532f3ebe5c1d0aa9d3fe17363c2d (diff)
downloadriscv-openocd-8304e1ba47caf18d4ce1c0e177976b092355aee1.zip
riscv-openocd-8304e1ba47caf18d4ce1c0e177976b092355aee1.tar.gz
riscv-openocd-8304e1ba47caf18d4ce1c0e177976b092355aee1.tar.bz2
Merge pull request #134 from riscv/compile
Fix compile warning with gcc 6.3.0
-rw-r--r--src/flash/nor/stm32f2x.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c
index 0e4abb5..65cb212 100644
--- a/src/flash/nor/stm32f2x.c
+++ b/src/flash/nor/stm32f2x.c
@@ -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) {