From 9683ccfa78dff27ef8479e3af8d6817f51455ec2 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 5 Feb 2017 08:49:18 +0000 Subject: [PATCH] MISRA-related changes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10083 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/oslib/include/chheap.h | 4 ++-- os/common/ports/ARMCMx/chcore_v6m.h | 6 +++--- os/common/ports/ARMCMx/chcore_v7m.h | 18 +++++++++--------- os/common/ports/e200/chcore.h | 24 ++++++++++++------------ 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/os/common/oslib/include/chheap.h b/os/common/oslib/include/chheap.h index 64840a0c7..db8b70269 100644 --- a/os/common/oslib/include/chheap.h +++ b/os/common/oslib/include/chheap.h @@ -39,9 +39,9 @@ * @note Cannot use the sizeof operator in this macro. */ #if (SIZEOF_PTR == 4) || defined(__DOXYGEN__) -#define CH_HEAP_ALIGNMENT 8 +#define CH_HEAP_ALIGNMENT 8U #elif (SIZEOF_PTR == 2) -#define CH_HEAP_ALIGNMENT 4 +#define CH_HEAP_ALIGNMENT 4U #else #error "unsupported pointer size" #endif diff --git a/os/common/ports/ARMCMx/chcore_v6m.h b/os/common/ports/ARMCMx/chcore_v6m.h index 07fb06afa..b5209107d 100644 --- a/os/common/ports/ARMCMx/chcore_v6m.h +++ b/os/common/ports/ARMCMx/chcore_v6m.h @@ -118,11 +118,11 @@ /* Derived constants and error checks. */ /*===========================================================================*/ -#if !defined(CH_CUSTOMER_LICENSED_PORT_CM0) -#error "CH_CUSTOMER_LICENSED_PORT_CM0 not defined" +#if !defined(CH_CUSTOMER_LIC_PORT_CM0) +#error "CH_CUSTOMER_LIC_PORT_CM0 not defined" #endif -#if CH_CUSTOMER_LICENSED_PORT_CM0 == FALSE +#if CH_CUSTOMER_LIC_PORT_CM0 == FALSE #error "ChibiOS Cortex-M0 port not licensed" #endif diff --git a/os/common/ports/ARMCMx/chcore_v7m.h b/os/common/ports/ARMCMx/chcore_v7m.h index 7a04d1f81..7b8514baa 100644 --- a/os/common/ports/ARMCMx/chcore_v7m.h +++ b/os/common/ports/ARMCMx/chcore_v7m.h @@ -186,11 +186,11 @@ */ #if (CORTEX_MODEL == 3) || defined(__DOXYGEN__) - #if !defined(CH_CUSTOMER_LICENSED_PORT_CM3) - #error "CH_CUSTOMER_LICENSED_PORT_CM3 not defined" + #if !defined(CH_CUSTOMER_LIC_PORT_CM3) + #error "CH_CUSTOMER_LIC_PORT_CM3 not defined" #endif - #if CH_CUSTOMER_LICENSED_PORT_CM3 == FALSE + #if CH_CUSTOMER_LIC_PORT_CM3 == FALSE #error "ChibiOS Cortex-M3 port not licensed" #endif @@ -215,11 +215,11 @@ #elif (CORTEX_MODEL == 4) - #if !defined(CH_CUSTOMER_LICENSED_PORT_CM4) - #error "CH_CUSTOMER_LICENSED_PORT_CM4 not defined" + #if !defined(CH_CUSTOMER_LIC_PORT_CM4) + #error "CH_CUSTOMER_LIC_PORT_CM4 not defined" #endif - #if CH_CUSTOMER_LICENSED_PORT_CM4 == FALSE + #if CH_CUSTOMER_LIC_PORT_CM4 == FALSE #error "ChibiOS Cortex-M4 port not licensed" #endif @@ -241,11 +241,11 @@ #elif (CORTEX_MODEL == 7) - #if !defined(CH_CUSTOMER_LICENSED_PORT_CM7) - #error "CH_CUSTOMER_LICENSED_PORT_CM7 not defined" + #if !defined(CH_CUSTOMER_LIC_PORT_CM7) + #error "CH_CUSTOMER_LIC_PORT_CM7 not defined" #endif - #if CH_CUSTOMER_LICENSED_PORT_CM7 == FALSE + #if CH_CUSTOMER_LIC_PORT_CM7 == FALSE #error "ChibiOS Cortex-M7 port not licensed" #endif diff --git a/os/common/ports/e200/chcore.h b/os/common/ports/e200/chcore.h index 54fc1535d..11cbe899b 100644 --- a/os/common/ports/e200/chcore.h +++ b/os/common/ports/e200/chcore.h @@ -179,11 +179,11 @@ */ #if (PPC_VARIANT == PPC_VARIANT_e200z0) || defined(__DOXYGEN__) -#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z0) -#error "CH_CUSTOMER_LICENSED_PORT_E200Z0 not defined" +#if !defined(CH_CUSTOMER_LIC_PORT_E200Z0) +#error "CH_CUSTOMER_LIC_PORT_E200Z0 not defined" #endif -#if CH_CUSTOMER_LICENSED_PORT_E200Z0 == FALSE +#if CH_CUSTOMER_LIC_PORT_E200Z0 == FALSE #error "ChibiOS Power e200z0 port not licensed" #endif @@ -191,11 +191,11 @@ #elif PPC_VARIANT == PPC_VARIANT_e200z2 -#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z2) -#error "CH_CUSTOMER_LICENSED_PORT_E200Z2 not defined" +#if !defined(CH_CUSTOMER_LIC_PORT_E200Z2) +#error "CH_CUSTOMER_LIC_PORT_E200Z2 not defined" #endif -#if CH_CUSTOMER_LICENSED_PORT_E200Z2 == FALSE +#if CH_CUSTOMER_LIC_PORT_E200Z2 == FALSE #error "ChibiOS Power e200z2 port not licensed" #endif @@ -203,11 +203,11 @@ #elif PPC_VARIANT == PPC_VARIANT_e200z3 -#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z3) -#error "CH_CUSTOMER_LICENSED_PORT_E200Z3 not defined" +#if !defined(CH_CUSTOMER_LIC_PORT_E200Z3) +#error "CH_CUSTOMER_LIC_PORT_E200Z3 not defined" #endif -#if CH_CUSTOMER_LICENSED_PORT_E200Z3 == FALSE +#if CH_CUSTOMER_LIC_PORT_E200Z3 == FALSE #error "ChibiOS Power e200z3 port not licensed" #endif @@ -215,11 +215,11 @@ #elif PPC_VARIANT == PPC_VARIANT_e200z4 -#if !defined(CH_CUSTOMER_LICENSED_PORT_E200Z4) -#error "CH_CUSTOMER_LICENSED_PORT_E200Z4 not defined" +#if !defined(CH_CUSTOMER_LIC_PORT_E200Z4) +#error "CH_CUSTOMER_LIC_PORT_E200Z4 not defined" #endif -#if CH_CUSTOMER_LICENSED_PORT_E200Z4 == FALSE +#if CH_CUSTOMER_LIC_PORT_E200Z4 == FALSE #error "ChibiOS Power e200z4 port not licensed" #endif