8000 Fix warnings, make warnings error on CI by ankith26 · Pull Request #2919 · pygame/pygame · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix warnings, make warnings error on CI #2919

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

Merged
merged 6 commits into from
Feb 5, 2022
Merged

Fix warnings, make warnings error on CI #2919

merged 6 commits into from
Feb 5, 2022

Conversation

ankith26
Copy link
Contributor
@ankith26 ankith26 commented Dec 16, 2021

PR to close #1316

Fixes some compiler warnings (and also skips some warnings) and make warnings error on CI

Also fixes most MSVC static analyzer warnings (all except ones in pygame.mask) and those too error on CI

Some skipped warnings (todos for future)

  • GCC on linux complains about unused-but-set-variable while compiling freetype. There is a complex macro system here that caused the warning, that seemed hard to fix so I skipped it for now
  • MSVC static analyzer complains while compiling pygame.mask about possible buffer overflows, and I'm not sure whether it's a false report or not here, so I skipped it here for now

@ankith26 ankith26 force-pushed the ankith26-werror branch 4 times, most recently from 5aeb6c4 to 930fc72 Compare December 16, 2021 12:18
@ankith26 ankith26 marked this pull request as draft December 16, 2021 12:30
@ankith26 ankith26 added this to the 2.1.1 milestone Dec 17, 2021
@ankith26 ankith26 force-pushed the ankith26-werror branch 3 times, most recently from 5a49847 to 28c8a66 Compare December 17, 2021 04:38
@Starbuck5 Starbuck5 removed this from the 2.1.1 milestone Dec 17, 2021
@ankith26 ankith26 marked this pull request as ready for review December 18, 2021 06:08
@ankith26 ankith26 force-pushed the ankith26-werror branch 3 times, most recently from 2def78c to f838b7f Compare December 18, 2021 11:32
@ankith26 ankith26 marked this pull request as draft December 18, 2021 11:55
@ankith26 ankith26 marked this pull request as ready for review December 18, 2021 13:43
@ankith26 ankith26 added this to the 2.1.1 milestone Dec 18, 2021
@ankith26 ankith26 force-pushed the ankith26-werror branch 2 times, most recently from 47e37fe to 7bcf409 Compare December 19, 2021 12:55
@illume
Copy link
Member
illume commented Dec 20, 2021

Very good! It's my understanding that static analysis errors

  • often cause bugs when the warnings are fixed
  • often point to areas of code that are smelly in some way other than the warning they fix

So I want to take a bit more time than usual to review these by testing out the code in a debugger and such, as well as having a look at code/docs/tests around the areas fixed.

Probably the two open tasks could be turned into two new issues?

@illume illume added bug Linters Related to code linting issues or solutions needs-review labels Dec 22, 2021
@ankith26
Copy link
Contributor Author

For the most part I'm fairly confident this PR is safe, but yeah I'd appreciate if you and/or anyone else could do a bit more checking around pixelarray and buffer stuff, as I'm not too sure about those fixes

@illume illume modified the milestones: 2.1.1, 2.1.2 Dec 24, 2021
@ankith26 ankith26 linked an issue Dec 31, 2021 that may be closed by this pull request
@ankith26 ankith26 force-pushed the ankith26-werror branch 5 times, most recently from 9ba9c86 to 4bc5918 Compare January 2, 2022 06:52
@ankith26 ankith26 force-pushed the ankith26-werror branch 3 times, most recently from 1bd58c0 to 57aa52e Compare January 3, 2022 12:48
Copy link
Member
@illume illume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 TMNT 👀🥷🐢

thanks heaps

@illume illume merged commit 29a8769 into main Feb 5, 2022
@illume illume deleted the ankith26-werror branch February 5, 2022 17:23
#else
#define PG_LSEEK lseek64
#endif

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Proposed #3898 to improve this on non-glibc platforms.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Linters Related to code linting issues or solutions needs-review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cppchecker Compiler warnings should fail on CI.
4 participants
0