Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge upstream #10

Open
wants to merge 142 commits into
base: teeglue
Choose a base branch
from
Open

Merge upstream #10

wants to merge 142 commits into from

Conversation

Bamcane
Copy link

@Bamcane Bamcane commented Aug 4, 2024

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 <[email protected]>
Co-authored-by: Dennis Felsing <[email protected]>
 /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 <[email protected]>
/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 <[email protected]>
/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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.