mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07:00
Suppress false positive in cppcheck
```
source/simulation2/components/CCmpRangeManager.cpp:1953:18: error: Out of bounds access in 'm_LosRevealAll[MAX_LOS_PLAYER_ID+1]', if 'm_LosRevealAll' size is 16 and 'MAX_LOS_PLAYER_ID+1' is 17 [containerOutOfBounds]
m_LosRevealAll[MAX_LOS_PLAYER_ID+1] = enabled;
^
source/simulation2/components/CCmpRangeManager.cpp:1967:21: error: Out of bounds access in 'm_LosRevealAll[MAX_LOS_PLAYER_ID+1]', if 'm_LosRevealAll' size is 16 and 'MAX_LOS_PLAYER_ID+1' is 17 [containerOutOfBounds]
if (m_LosRevealAll[MAX_LOS_PLAYER_ID+1] || player == -1)
^
```
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
This commit is contained in:
parent
9ea5a789a7
commit
66738c12a1
1 changed files with 3 additions and 0 deletions
|
|
@ -17,6 +17,9 @@ unknownMacro:source/simulation2/TypeList.h
|
|||
|
||||
// Issues reported by cppcheck and not yet fixed
|
||||
|
||||
// false positive
|
||||
containerOutOfBounds:source/simulation2/components/CCmpRangeManager.cpp
|
||||
|
||||
danglingLifetime:source/lib/sysdep/os/unix/ufilesystem.cpp
|
||||
|
||||
danglingTemporaryLifetime:source/graphics/TerrainTextureManager.cpp
|
||||
|
|
|
|||
Loading…
Reference in a new issue