File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
cpp/misra/test/rules/RULE-8-7-1 Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -130,15 +130,15 @@ void stack_allocated_multi_dimensional_array_access(int array[2][3]) {
130130 int valid11 = array[0 ][0 ]; // COMPLIANT: pointer is within boundary
131131 int valid12 = array[0 ][1 ]; // COMPLIANT: pointer is within boundary
132132 int valid13 = array[0 ][2 ]; // COMPLIANT: pointer is within boundary
133- int valid13 = array[0 ][3 ]; // COMPLIANT: pointer points one beyond the last
133+ int valid14 = array[0 ][3 ]; // COMPLIANT: pointer points one beyond the last
134134 // element, but non-compliant to Rule 4.1.3
135135 int invalid1 = array[0 ][4 ]; // NON_COMPLIANT: pointer points more than one
136136 // beyond the last element
137137
138138 int valid21 = array[1 ][0 ]; // COMPLIANT: pointer is within boundary
139139 int valid22 = array[1 ][1 ]; // COMPLIANT: pointer is within boundary
140140 int valid23 = array[1 ][2 ]; // COMPLIANT: pointer is within boundary
141- int valid13 = array[1 ][3 ]; // COMPLIANT: pointer points one beyond the last
141+ int valid24 = array[1 ][3 ]; // COMPLIANT: pointer points one beyond the last
142142 // element, but non-compliant to Rule 4.1.3
143143 int invalid2 = array[1 ][4 ]; // NON_COMPLIANT: pointer points more than one
144144 // beyond the last element
You can’t perform that action at this time.
0 commit comments