warning: Either the condition 'n>DEPTH' is redundant or 'n' can have the
value 4. Expression 'arr[n]' cause access out of bounds. [containerOutOfBounds] return &arr[n]; ^
There might also be a typo in the error message as here the array index can
range from 0 to 4, and it says "can have the value 4" instead of ">4".
I think this is a false positive.
warning: Either the condition 'n>DEPTH' is redundant or 'n' can have the
value 4. Expression 'arr[n]' cause access out of bounds.
[containerOutOfBounds] return &arr[n]; ^
There might also be a typo in the error message as here the array index can
range from 0 to 4, and it says "can have the value 4" instead of ">4".
But I changed it and it still doesn't pass:
-Doug
Last edit: DougCube 5 days ago
I can't reproduce this, which version are you using?
Also, please add
~~~around code.2.13.0
I switched to version 2.19.0 and this issue is fixed.