Cppcheck says that if aArray's size is 1 then the access aArray[i+1] would be out of bounds. However, due to the if condition, that access would never occur in such a scenario.
Thanks.
Last edit: Muhammad Javed 2022-12-20
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have the following scenario:
Cppcheck gives the following report about this code:
Cppcheck says that if
aArray
's size is 1 then the accessaArray[i+1]
would be out of bounds. However, due to the if condition, that access would never occur in such a scenario.Thanks.
Last edit: Muhammad Javed 2022-12-20
Thanks for reporting, I have created this ticket: https://trac.cppcheck.net/ticket/11447
Thank you so much!