/media/ddnet/src/engine/shared/dilate.cpp:32:22: warning: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign]
/media/ddnet/src/game/client/animstate.cpp:54:27: warning: The left operand of '*' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
pSeq->m_X += pAdded->m_X * Amount;
^
/media/ddnet/src/game/editor/auto_map.cpp:94:17: warning: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage]
int RunID = pCurrentConf->m_aRuns.add(NewRun);
^
/media/ddnet/src/engine/server/sql_string_helpers.cpp:74:3: warning: Call to function 'strcpy' is insecure as it does not provide bounding of the memory buffer. Replace unbounded copy functions with analogous functions that support length arguments such as 'strlcpy'. CWE-119 [clang-analyzer-security.insecureAPI.strcpy]
and mark some false positives
/media/ddnet/src/engine/client/backend_sdl.cpp:329:30: warning: Call to 'malloc' has an allocation size of 0 bytes [clang-analyzer-optin.portability.UnixAPI]
/media/ddnet/src/game/editor/auto_map.cpp:433:1: warning: Potential leak of memory pointed to by 'pUpdateLayer' [clang-analyzer-cplusplus.NewDeleteLeaks]
}
^
[81/219] Building CXX object CMakeFiles/game-shared.dir/src/game/collision.cpp.o
/media/ddnet/src/game/collision.cpp:1197:2: warning: Variable 'f' with floating point type 'float' should not be used as a loop counter [clang-analyzer-security.FloatLoopCounter]
for(float f = 0; f < d; f++)
^
The actual work will be fixing those or at least
NOLINT(clang-analyzer-optin.cplusplus.VirtualCall) them so we can enable
this. Disable checks that we don't want.
Exclude external directory from clang-tidy.
3092: Use pointer directly for tile layer building r=heinrich5991 a=Jupeyy
Huge maps like back in time 2, will always "only" upload 2MB of data at once, and then wait for the graphics thread to finish building/copying the VRAM, this might increase performance a bit
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3089: Fix out of bounds access in snapshot delta handling r=heinrich5991 a=axblk
Same as 293209e722 + c87a7b438f in 0.7
Co-authored-by: Redix <redix@hotmail.de>
3086: Fix 2 leaks in CServerBrowser r=def- a=Learath2
The only leaks reported by ASan that are allocated by us. There is one other by SDL and one by X11.
Co-authored-by: Learath2 <learath2@gmail.com>
3083: Make menu background camera impl more robust r=def- a=Jupeyy
The vanilla code isnt really robust against short distances, hope this fixes almost all edge cases
Co-authored-by: Jupeyy <jupjopjap@gmail.com>
3085: Don't waste bytes when we are already aligned r=Jupeyy a=Learath2
This fixes#3084, seems to be enough to make all the data fit in the buffer again.
Co-authored-by: Learath2 <learath2@gmail.com>
3082: Set correct value on layer saving (which was recently uninitialized) r=def- a=Patiga
Didn't check out the teeworlds source while setting the value the last time. teeworlds sets those values to 0.
Co-authored-by: Patiga <dev@patiga.eu>
3078: Make initial borderless work again r=heinrich5991 a=def-
Mistakenly disabled in https://github.com/ddnet/ddnet/pull/1418
Co-authored-by: def <dennis@felsin9.de>
3068: Fix alignment issues in CCommandBuffer r=def- a=Learath2
Though I prefer this version I also made one keeping the old ugly pointer arithmetic cb61356105
Feel free to take whichever. Supersedes #3061
Co-authored-by: Learath2 <learath2@gmail.com>
3066: Disallow more commands with testing mode r=def- a=heinrich5991
Also show some useful error message
Supersedes #2778.
Co-authored-by: Andrii <bannzay3@gmail.com>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com>
src/game/teamscore.cpp:27:78: runtime error: index -1 out of bounds for type 'int const[64]'
#0 0xf5b948 in CTeamsCore::CanKeepHook(int, int) const src/game/teamscore.cpp:27
#1 0xf46fe1 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:325
#2 0xaf7366 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2441
#3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
#4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
#5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
#6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
#7 0x557fda in main src/engine/client/client.cpp:4341
#8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
#9 0x433e29 in _start (build/DDNet+0x433e29)
src/game/teamscore.cpp:34:78: runtime error: index -1 out of bounds for type 'int const[64]'
#0 0xf5be68 in CTeamsCore::CanCollide(int, int) const src/game/teamscore.cpp:34
#1 0xf46458 in CCharacterCore::Tick(bool) src/game/gamecore.cpp:271
#2 0xaf7374 in CGameClient::DetectStrongHook() src/game/client/gameclient.cpp:2442
#3 0xadd734 in CGameClient::UpdatePrediction() src/game/client/gameclient.cpp:2249
#4 0xad6e17 in CGameClient::OnNewSnapshot() src/game/client/gameclient.cpp:1675
#5 0x522d55 in CClient::Update() src/engine/client/client.cpp:2767
#6 0x5333e4 in CClient::Run() src/engine/client/client.cpp:3237
#7 0x557fda in main src/engine/client/client.cpp:4341
#8 0x7f55e8c75cc9 in __libc_start_main ../csu/libc-start.c:308
#9 0x433e29 in _start (build/DDNet+0x433e29)