Skip to content
This repository was archived by the owner on Jan 25, 2025. It is now read-only.

Merge upstream#10

Open
Bamcane wants to merge 142 commits into
teegluefrom
master
Open

Merge upstream#10
Bamcane wants to merge 142 commits into
teegluefrom
master

Conversation

@Bamcane

@Bamcane Bamcane commented Aug 4, 2024

Copy link
Copy Markdown

No description provided.

heinrich5991 and others added 30 commits December 8, 2020 19:58
Allocate memory for entire file at once. Only reallocate memory if actual file size differs from initially determined size.
oy and others added 30 commits July 27, 2024 14:14
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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.