From ce7f7103df5f634f7b57d90e115c5824adcb68a0 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 8 Mar 2015 21:19:58 +0000 Subject: MISRA fixes for high level HAL. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7738 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- test/hal/testbuild/Makefile | 2 +- test/hal/testbuild/pclint/waivers.lnt | 28 +++++++++++++++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) (limited to 'test/hal') diff --git a/test/hal/testbuild/Makefile b/test/hal/testbuild/Makefile index 9568908d0..e5cd11784 100644 --- a/test/hal/testbuild/Makefile +++ b/test/hal/testbuild/Makefile @@ -206,4 +206,4 @@ RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC include $(RULESPATH)/rules.mk misra: - @lint-nt -v -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(INCDIR) $(KERNSRC) &> misra.txt + lint-nt -w3 $(DEFS) pclint/co-gcc.lnt pclint/au-misra3.lnt pclint/waivers.lnt $(IINCDIR) $(HALSRC) $(OSALSRC) $(PLATFORMSRC) > misra.txt diff --git a/test/hal/testbuild/pclint/waivers.lnt b/test/hal/testbuild/pclint/waivers.lnt index e6caa1612..67befb44a 100644 --- a/test/hal/testbuild/pclint/waivers.lnt +++ b/test/hal/testbuild/pclint/waivers.lnt @@ -10,12 +10,14 @@ /* Silencing common non-MISRA info generated by PCLint in -w3 mode. All of them have been controlled. Other infos have been fixed in the code.*/ -e526 -e537 --e714 -e716 -e717 -e757 -e758 -e759 -e768 -e773 +-e613 +-e714 -e716 -e717 -e749 -e757 -e758 -e759 -e768 -e773 -e778 -e793 -e826 -e830 -e835 -e845 /* Removing *advisory* directives and rules that would negatively impact code readability or not avoidable.*/ -e970 /* Dir-4.6 */ +-e9045 /* Dir-4.8 */ -e9026 /* Dir-4.9 */ -e756 /* Rule-2.3 */ -e9058 /* Rule-2.4 */ @@ -25,6 +27,10 @@ -e818 /* Rule 8.13 */ -e9078 /* Rule-11.4 */ -e9079 /* Rule-11.5 */ +-e9049 /* Rule-13.3 */ +-e9084 /* Rule-13.4 */ +-e801 /* Rule-15.1 */ +-e9011 /* Rule-15.4 */ -e904 /* Rule-15.5 */ -e9044 /* Rule-17.8 */ -e9016 /* Rule-18.4 */ @@ -53,17 +59,37 @@ from asm modules.*/ -e765 +/* Waiver Rule 11.1, casts of function pointers are required by system + design.*/ +-e9074 + +/* Waiver Rule 11.3, casts among different types are required by system + design.*/ +-e740 /* Wrongly marked as 1.3 in PCLint 9-0L.*/ +-e9087 + /* Waiver Rule 11.6, cast from integer to pointer is very commonly used when accessing peripherals where the numeric address of the registers block is cast to a structure pointer.*/ -e923 +/* Waiver Rule 16.1, missing break into case. It is a common occurrence and + thoroughly checked.*/ /* Waiver Rule 16.3, missing break into case. It is a common occurrence and thoroughly checked.*/ -e9090 +-e9077 +-e9042 -e616 -e825 +/* Waiver Rule 18.2, pointers arithmetic is required by system design and + deemed safe.*/ +/* Waiver Rule 18.3, comparisons among pointers is required by system design + and deemed safe.*/ +-e946 +-e947 + /* Waiver Rule 21.1, this is an operating system, its identifiers are equivalent in importance to compiler symbols.*/ -e9071 -- cgit v1.2.3