The analyzer has detected that the outer loop counter in the post-statement of an inner loop is modified, which may indicate a logical error.
The simple version of this error looks like this:
for i := 0; i < M; i++ {
for j := 0; j < N; i++ {
a[i][j] = 0
}
}
In the inner loop, the i variable is incremented instead of j. The fixed code:
for i := 0; i < M; i++ {
for j := 0; j < N; j++ {
a[i][j] = 0
}
}
This diagnostic rule is classified as:
Was this page helpful?