File tree Expand file tree Collapse file tree 4 files changed +4
-4
lines changed
misra/test/rules/RULE-12-2 Expand file tree Collapse file tree 4 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -82,7 +82,7 @@ int closing_helper(FILE *g) {
82
82
return 0 ;
83
83
}
84
84
int f2inter (const char * filename ) {
85
- FILE * f = fopen (filename , "r" ); // COMPLIANT ( FALSE_POSITIVE)
85
+ FILE * f = fopen (filename , "r" ); // COMPLIANT[ FALSE_POSITIVE]
86
86
if (NULL == f ) {
87
87
return -1 ;
88
88
}
Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ void f1() {
20
20
ul << 64 ; // NON_COMPLIANT
21
21
22
22
// 1UL essential type is essentially unsigned long
23
- 1UL << 10 ; // COMPLIANT( FALSE_POSITIVE)
23
+ 1UL << 10 ; // COMPLIANT[ FALSE_POSITIVE]
24
24
1UL << 64 ; // NON_COMPLIANT
25
25
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ void test_single_array_item(bool do_array_delete) {
41
41
c_ptr_array[5 ] = new char ;
42
42
43
43
if (do_array_delete) {
44
- delete[] c_ptr_array[5 ]; // NON_COMPLIANT [FALSE_NEGATIVE]
44
+ delete[] c_ptr_array[5 ]; // NON_COMPLIANT[FALSE_NEGATIVE]
45
45
} else {
46
46
delete c_ptr_array[5 ]; // COMPLIANT
47
47
}
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ void test_break(int a) {
73
73
return ;
74
74
}
75
75
void test_infeasible_break (unsigned int a) {
76
- while (true ) { // NON_COMPLIANT( FALSE_NEGATIVE)
76
+ while (true ) { // NON_COMPLIANT[ FALSE_NEGATIVE]
77
77
if (a < 0U ) // NON_COMPLIANT - the comparison is always false
78
78
break ;
79
79
You can’t perform that action at this time.
0 commit comments