This repository was archived by the owner on Jan 25, 2025. It is now read-only.
Conversation
Allocate memory for entire file at once. Only reallocate memory if actual file size differs from initially determined size.
Remove RGB images from the map file format
mixing declarations and code is incompatible with standards before C99
Fix system.c mixing declarations breaking macOS pipeline
Co-authored-by: Edgar Luque <git@edgarluque.com> Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: heinrich5991 <heinrich5991@gmail.com> Co-authored-by: Edgar Luque <git@edgarluque.com>
/home/runner/work/teeworlds/teeworlds/src/game/editor/editor.cpp:2824:38: error: The right operand of '>' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
if(m_FilePreviewImageInfo.m_Width > Preview.w)
^
/home/runner/work/teeworlds/teeworlds/src/game/client/animstate.cpp:54:26: error: The left operand of '*' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
pSeq->m_X += pAdded->m_X*Amount;
^
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
/home/runner/work/teeworlds/teeworlds/src/game/client/components/menus_settings.cpp:396:2: error: Value stored to 'OldSelected' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
OldSelected = NewSelected;
^
/home/runner/work/teeworlds/teeworlds/src/game/client/components/stats.cpp:346:4: error: Value stored to 'px' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
px += 100;
^
/home/runner/work/teeworlds/teeworlds/src/game/client/components/stats.cpp:543:4: error: Value stored to 'px' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
px += 100;
^
/home/runner/work/teeworlds/teeworlds/src/engine/client/textrender.cpp:1062:2: error: Value stored to 'Size' is never read [clang-analyzer-deadcode.DeadStores,-warnings-as-errors]
Size = PixelSize / ScreenScale.y;
^
/home/runner/work/teeworlds/teeworlds/src/engine/client/graphics_threaded.cpp:386:16: error: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign,-warnings-as-errors]
StoreFormat = Img.m_Format;
^
/home/runner/work/teeworlds/teeworlds/src/game/client/components/scoreboard.cpp:261:6: error: Access to field 'm_GameStateFlags' results in a dereference of a null pointer (loaded from field 'm_pGameData') [clang-analyzer-core.NullDereference,-warnings-as-errors]
/home/runner/work/teeworlds/teeworlds/src/game/client/gameclient.cpp:708:13: error: 1st function call argument is an uninitialized value [clang-analyzer-core.CallAndMessage,-warnings-as-errors]
switch(GetStrTeam(aParaI[0], TeamPlay))
^
/home/runner/work/teeworlds/teeworlds/src/game/editor/io.cpp:488:7: error: Forming reference to null pointer [clang-analyzer-core.NonNullParamChecker,-warnings-as-errors]
pEnv->m_lPoints[n] = pEnvPoints[pItem->m_StartPoint + n];
^
/home/runner/work/teeworlds/teeworlds/src/game/client/components/menus.cpp:180:24: error: Called C++ object pointer is null [clang-analyzer-core.CallAndMessage,-warnings-as-errors]
const float FadeVal = pButtonContainer->GetFade();
^
/home/runner/work/teeworlds/teeworlds/src/game/client/components/broadcast.cpp:252:102: error: The left operand of '-' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult,-warnings-as-errors]
TextRender()->TextDeferred(&m_ServerBroadcastCursor, aBuf + SegmentIndices[i], SegmentIndices[i+1] - SegmentIndices[i]);
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
Co-authored-by: Dennis Felsing <dennis@felsin9.de>
/home/runner/work/teeworlds/teeworlds/src/base/system.c:2235:65: error: operator has equivalent nested operands [misc-redundant-expression,-warnings-as-errors]
|| *str == '/' || *str == '\\' || *str == '|' || *str == '?' || *str == '*')
~~~~~~~~~~~ ^
Add clang-tidy to CI and enable clang-analyzer checks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.