You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by cc...@apache.org on 2016/10/26 21:40:51 UTC

incubator-mynewt-core git commit: os_arch_arm - Fix truncation warning.

Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 76d81d1d7 -> 356f0cd7d


os_arch_arm - Fix truncation warning.

Assign -1 rather than 0xffffffff; -1 will wrap to the largest value
for the type being assigned to.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/356f0cd7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/356f0cd7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/356f0cd7

Branch: refs/heads/develop
Commit: 356f0cd7dba7b263d5e78a7d0cd8435c6f15b51e
Parents: 76d81d1
Author: Christopher Collins <cc...@apache.org>
Authored: Wed Oct 26 14:39:54 2016 -0700
Committer: Christopher Collins <cc...@apache.org>
Committed: Wed Oct 26 14:39:54 2016 -0700

----------------------------------------------------------------------
 kernel/os/src/arch/cortex_m0/os_arch_arm.c | 2 +-
 kernel/os/src/arch/cortex_m4/os_arch_arm.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/356f0cd7/kernel/os/src/arch/cortex_m0/os_arch_arm.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/arch/cortex_m0/os_arch_arm.c b/kernel/os/src/arch/cortex_m0/os_arch_arm.c
index 6d501c0..1c6400b 100755
--- a/kernel/os/src/arch/cortex_m0/os_arch_arm.c
+++ b/kernel/os/src/arch/cortex_m0/os_arch_arm.c
@@ -197,7 +197,7 @@ os_arch_os_init(void)
 
         /* Drop priority for all interrupts */
         for (i = 0; i < sizeof(NVIC->IP); i++) {
-            NVIC->IP[i] = 0xffffffff;
+            NVIC->IP[i] = -1;
         }
 
         NVIC_SetVector(SVCall_IRQn, (uint32_t)SVC_Handler);

http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/356f0cd7/kernel/os/src/arch/cortex_m4/os_arch_arm.c
----------------------------------------------------------------------
diff --git a/kernel/os/src/arch/cortex_m4/os_arch_arm.c b/kernel/os/src/arch/cortex_m4/os_arch_arm.c
index 08c70a3..59cee8a 100755
--- a/kernel/os/src/arch/cortex_m4/os_arch_arm.c
+++ b/kernel/os/src/arch/cortex_m4/os_arch_arm.c
@@ -200,7 +200,7 @@ os_arch_os_init(void)
 
         /* Drop priority for all interrupts */
         for (i = 0; i < sizeof(NVIC->IP); i++) {
-            NVIC->IP[i] = 0xffffffff;
+            NVIC->IP[i] = -1;
         }
 
         NVIC_SetVector(SVCall_IRQn, (uint32_t)SVC_Handler);