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) {
8282 return 0 ;
8383}
8484int f2inter (const char * filename ) {
85- FILE * f = fopen (filename , "r" ); // COMPLIANT ( FALSE_POSITIVE)
85+ FILE * f = fopen (filename , "r" ); // COMPLIANT[ FALSE_POSITIVE]
8686 if (NULL == f ) {
8787 return -1 ;
8888 }
Original file line number Diff line number Diff line change @@ -20,6 +20,6 @@ void f1() {
2020 ul << 64 ; // NON_COMPLIANT
2121
2222 // 1UL essential type is essentially unsigned long
23- 1UL << 10 ; // COMPLIANT( FALSE_POSITIVE)
23+ 1UL << 10 ; // COMPLIANT[ FALSE_POSITIVE]
2424 1UL << 64 ; // NON_COMPLIANT
2525}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ void test_single_array_item(bool do_array_delete) {
4141 c_ptr_array[5 ] = new char ;
4242
4343 if (do_array_delete) {
44- delete[] c_ptr_array[5 ]; // NON_COMPLIANT [FALSE_NEGATIVE]
44+ delete[] c_ptr_array[5 ]; // NON_COMPLIANT[FALSE_NEGATIVE]
4545 } else {
4646 delete c_ptr_array[5 ]; // COMPLIANT
4747 }
Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ void test_break(int a) {
7373 return ;
7474}
7575void test_infeasible_break (unsigned int a) {
76- while (true ) { // NON_COMPLIANT( FALSE_NEGATIVE)
76+ while (true ) { // NON_COMPLIANT[ FALSE_NEGATIVE]
7777 if (a < 0U ) // NON_COMPLIANT - the comparison is always false
7878 break ;
7979
You can’t perform that action at this time.
0 commit comments