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:
Ralph Sennhauser 2025-11-10 20:30:27 +01:00
parent 9ea5a789a7
commit 66738c12a1
No known key found for this signature in database

View file

@ -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