mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
155a922d47
4628: Disable or fix some spammy new clang-tidy 13 warnings r=heinrich5991 a=def- ``` src/engine/client/backend/opengles/opengles_sl_program.cpp:10:11: warning: suspicious #include of file with '.cpp' extension [bugprone-suspicious-include] ^ src/engine/graphics.h:330:67: warning: 2 adjacent parameters of 'CFreeformItem' of similar type ('float') are easily swapped by mistake [bugprone-easily-swappable-parameters] CFreeformItem(float x0, float y0, float x1, float y1, float x2, float y2, float x3, float y3) : ^~~~~~~~~~~~~~~~~~ src/game/editor/layer_tiles.cpp:1802:14: warning: result of multiplication in type 'int' is used as a pointer offset after an implicit widening conversion to type 'ptrdiff_t' [bugprone-implicit-widening-of-multiplication-result] mem_zero(&m_pSwitchTile[y * m_Width], o * sizeof(CSwitchTile)); ^ src/game/server/entities/plasma.cpp💯152: warning: operator has equivalent nested operands [misc-redundant-expression] if(SnapPlayer && SnapPlayer->GetTeam() != TEAM_SPECTATORS && !SnapPlayer->IsPaused() && SnapChar && SnapChar && SnapChar->Team() != m_ResponsibleTeam && SnapPlayer->m_ShowOthers != 1) ~~~~~~~~ ~~~~~~~~ ^ src/game/editor/editor.cpp:4295:38: warning: The right operand of '>' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult] if(m_FilePreviewImageInfo.m_Width > Preview.w) ^ ~~~~~~~~~ ``` <!-- What is the motivation for the changes of this pull request --> ## Checklist - [ ] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) 4639: Fix SendStartWarning() to only warn every 3 seconds r=heinrich5991 a=def- Thanks for Skeith for report <!-- What is the motivation for the changes of this pull request --> ## Checklist - [x] Tested the change ingame - [ ] Provided screenshots if it is a visual change - [ ] Tested in combination with possibly related configuration options - [ ] Written a unit test if it works standalone, system.c especially - [ ] Considered possible null pointers and out of bounds array indexing - [ ] Changed no physics that affect existing maps - [ ] Tested the change with [ASan+UBSan or valgrind's memcheck](https://github.com/ddnet/ddnet/#using-addresssanitizer--undefinedbehavioursanitizer-or-valgrinds-memcheck) (optional) Co-authored-by: def <dennis@felsin9.de> Co-authored-by: Dennis Felsing <dennis@felsin9.de> |
||
---|---|---|
.. | ||
android | ||
antibot | ||
base | ||
engine | ||
game | ||
macos | ||
macoslaunch | ||
mastersrv | ||
steam | ||
test | ||
tools | ||
twping |