Testbed 术语表 125 函数返回类型不一致
101 S Function return type inconsistent. MISRA/DERA 83iii 801
126 函数和函数的原型的返回不一致
102 S Function and prototype return inconsistent (MR). MISRA/DERA 72 MISRA-C2 8.3
127 函数和函数的原型的形参不一致
103 S Function and prototype param inconsistent (MR). MISRA/DERA 72, 26 MISRA-C2 8.4
128 结构体变量的初始化类型不一致
104 S Struct field initialisation incorrect. MISRA/DERA 31
129 结构体变量初始化的嵌套结构不一致
105 S Struct field initialisation brace fault. MISRA/DERA 29 AV 144 MISRA-C2 9.2
130 标识符超出***字符
17 D Identifier not unique within *** characters. MISRA/DERA 11 AV 46 MISRA-C2 1.4 5.1
131 标识符名称重用
18 D Identifier name reused MISRA/DERA 12 AV 135 MISRA-C2 5.5
132 过程在被定义前调用
19 D Procedure called before being defined. MISRA/DERA 20, 71
133 变量在使用前没有被声明
20 D No declaration for variable found before use. MISRA/DERA 20
134 过程的声明在模块的内部
21 D Procedure declared in inner block MISRA/DERA 68
135 函数存在全局变量的副作用
22 D Function has global variable side effects MISRA/DERA 33, 46 MISRA-C2 12.4
136 函数存在形参的副作用
23 D Function has parameter side effects MISRA/DERA 33, 46
137 函数没有定义原型
24 D Procedure definition has no associated prototype MISRA/DERA 71 MISRA-C2 8.1 EADS-C 107,118
138 变量的范围可以减少
25 D Scope of variable could be reduced MISRA/DERA 22 MISRA-C2 8.7
139 变量在一个文件中只能被定义一次
26 D Variable should be defined once in only one file MISRA/DERA 25 AV 139 MISRA-C2 8.8
140 一个文件的变量应该被声明为静态的
27 D Variable should be declared static MISRA/DERA 23 MISRA-C2 8.10 8.11 EADS-C 97
上海创景计算机系统有限公司 8 Testbed 术语表 141 使用volatile类型的定义
106 S Volatile declaration. AV 205
142 三重表达式中类型不匹配
107 S Type mismatch in ternary expression. DERA 144
143 未使用 108 S Not used.
144 数组的下标不是整形
109 S Array subscript is not integral. DERA 162
146 标号不是包含在switch语句中的
111 S Label is not part of switch statement (MR). MISRA/DERA 55 AV 188
147 用typedef定义的类型名被重新定义
112 S Typedef name redeclared. MISRA/DERA 17 MISRA-C2 5.3 5.6
148 存在潜在的无限循环
28 D Potentially infinite loop found EADS-C 133
149 部分地使用结构体变量
29 D Partially used structure parameter
150 未使用
30 D Unused in C/C++
151 参数结构不一致
31 D Parameter structure mismatch
152 形参没有定义
32 D Formal parameter not defined
153 外部变量没有真实的声明
33 D No real declaration for external variable MISRA/DERA 25
154 源程序中使用非标准字符
113 s Non standard character in source. MISRA/DERA 5 AV 9 70 外部的在头文件中没有提及
46 S extern not in nominated include file. MISRA/DERA 27 73 逻辑上关联的表达式需要括号
49 S Logical conjunctions need brackets. MISRA/DERA 34 AV 158,213 EADS-C 98 79 一个表达式有多个功能
55 S Expression with more than one function. MISRA/DERA 46 91 在模块中使用#define
67 S #Define used in a block. MISRA/DERA 91 MISRA-C2 19.5
上海创景计算机系统有限公司 9 Testbed 术语表 92 使用#undef
68 S #undef used. MISRA/DERA 92 MISRA-C2 19.6 20.1
94 使用指针做逻辑比较
70 S Logical comparison of pointers. MISRA/DERA 103 AV 171 MISRA-C2 17.3
101 宏表示的带参数的函数,宏没有附上括号
77 S Macro is not function like. MISRA/DERA 96 AV 29 EADS-C 92
102 宏的参数没有括号
78 S Macro parameter not in brackets. MISRA/DERA 96 MISRA-C2 19.10 EADS-C 92
114 使用基本类型的声明
90 S Basic type declaration used. MISRA/DERA 13 AV 209 MISRA-C2 6.3 EADS-C 84
120 使用混合方式运算
96 S Use of mixed mode arithmetic. MISRA/DERA 43, 48 AV 162,180,184 MISRA-C2 6.2 1
121 多余的类型转换
97 S Use of redundant cast. MISRA/DERA 44, 48 AV 181
145 使用单行注释//
110 S Use of single line comment //. MISRA/DERA 1 MISRA-C2 2.2
155 表达式不是逻辑表达式
114 S Expression is not Boolean. MISRA/DERA 35,36,49 (One of) MISRA-C2 12.6 13.2
156 使用不正确的终止字符串 115 S String incorrectly terminated.
157 建议与0进行逻辑比较
116 S Boolean comparison with 0 preferred. DERA 138
158 对常量值进行逻辑非的运算 117 S Logical negation of constant value.
159 主函数必须为int(void)或者int(int,char*[]) 118 S Main must be int (void) or int (int,char*[]). DERA 146
160 存在嵌套注释
119 S Nested comment found MISRA/DERA 9 MISRA-C2 2.3
161 对有符号类型使用位操作
120 S Use of bit operator on signed type. MISRA/DERA 37 AV 161 MISRA-C2 12.7
上海创景计算机系统有限公司 10 Testbed 术语表 162 switch语句的表达式是逻辑表达式
121 S Use of boolean expression in switch. MISRA/DERA 63 AV 195 MISRA-C2 15.4
163 使用abort,exit等函数
122 S Use of abort, exit, etc. MISRA/DERA 126 AV 24 MISRA-C2 20.11
164 枚举类型的越限使用
123 S Banned use of enumerated type. DERA 139 EADS-C++ 56,57
165 使用前缀“++”、“――”
124 S Use of prefix ++ or -- DERA 136
166 在宏中使用“##”、“#”
125 S Use of ## or # in a macro DERA 155 MISRA-C2 19.13
167 在同一个文件中#if没有#endif
126 S A #if has no #endif in the same file. DERA 156 MISRA-C2 19.17
168 数组没有边界限定
127 S Array has no bounds specified. DERA 162, DERA 166 MISRA-C2 8.12
169 参数与全局变量同名
128 S Parameter has same name as global variable. MISRA/DERA 12 DERA 128 801 MISRA-C2 5.2
170 参数与类型或标识符同名
129 S Parameter has same name as type or tag. MISRA/DERA 12 801 MISRA-C2 5.2
171 禁止使用头文件的内容
130 S Included file is not permitted. MISRA/DERA 123,124 AV 17,19,21,22,25 MISRA-C2 2
172 在整个系统中声明的类型不一致
1 X Declaration types do not match across a system. MISRA/DERA 26 MISRA-C2 8.4
173 不同的文件中过程名被重用
34 D Procedure name re-used in different files. MISRA/DERA 25
174 在函数内部变量名被重用
131 S Name reused in inner scope. MISRA/DERA 21 DERA 128 AV 135,138 801 MISRA-C2
175 在逻辑表达式中使用赋值操作符
132 S Assignment operator in boolean expression. MISRA/DERA 35 AV 160 MISRA-C2 13.1
176 赋值操作符与“&&”或“||”连用
133 S Assignment operator in RHS of && or || MISRA/DERA 33 AV 157
177 在复杂的表达式中使用volatile类型的变量
134 S Volatile variable in complex expression. MISRA/DERA 46 MISRA-C2 12.2
上海创景计算机系统有限公司 11 Testbed 术语表 178 参数表定义是KR形式
135 S Parameter list is KR. AV 8
179 位操作符带有布尔型的操作数
136 S Bit operator with boolean operand. MISRA/DERA 36
180 表达式有副作用
35 D Expression has side effects. MISRA/DERA 46 AV 157 MISRA-C2 12.4
181 位操作符作用于布尔值
137 S Bit operator acting on boolean value. MISRA/DERA 36
182 结构体中使用无名位域
138 S Anonymous bit field used in structure. MISRA/DERA 113 AV 156
183 由于设计原因导致某些代码不可执行
139 S Construct leads to infeasible code. MISRA/DERA 52
184 存在不可控制的循环条件
140 S Infeasible loop condition found. MISRA/DERA 52
185 结构声明不完整
141 S Incomplete structure or class declaration. MISRA/DERA 108
186 变量声明不明确
2 X Ambiguous declaration of variable. MISRA/DERA 25
187 形参的声明形式上不一致
142 S Parameter list declarations are inconsistent. MISRA/DERA 73
188 函数的原形与定义的形参名称不一致
36 D Prototype and Definition name mismatch. MISRA/DERA 74 MISRA-C2 16.4
189 函数调用有执行顺序副作用
1 Q Call has execution order dependant side effects. MISRA/DERA 33, 46 AV 157,204 MISRA-C2 12.2
190 函数有静态局部变量的副影响
37 D Function has persistent local side effects. MISRA/DERA 33, 46
191 表达式中使用{}
143 S Curly brackets used in expression.
192 禁止使用浮点运算
144 S Floating point not permitted. DERA 129
193 194
无效的 #if表达式 #define有空的参数列表
145 S #if has invalid expression.
146 S #define with empty parameter list.
上海创景计算机系统有限公司 12