forked from mirrors/0ad
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user