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

cleanup: Upgrade cppcheck, fix some warnings. #2504

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

iphydf
Copy link
Member

@iphydf iphydf commented Dec 26, 2023

Also started teaching it about toxcore's alloc/dealloc functions in hopes of it catching some errors (it doesn't seem to be very good at this, but maybe better than nothing?).


This change is Reviewable

@iphydf iphydf added this to the v0.2.19 milestone Dec 26, 2023
@iphydf iphydf marked this pull request as ready for review December 26, 2023 22:09
@iphydf iphydf requested a review from a team as a code owner December 26, 2023 22:09
@iphydf iphydf changed the title test: Upgrade cppcheck, fix some warnings. cleanup: Upgrade cppcheck, fix some warnings. Dec 26, 2023
Copy link

codecov bot commented Dec 26, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (766e62b) 69.01% compared to head (b7f9367) 69.00%.

Files Patch % Lines
toxav/msi.c 50.00% 1 Missing ⚠️
toxcore/DHT.c 75.00% 1 Missing ⚠️
toxcore/announce.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2504      +/-   ##
==========================================
- Coverage   69.01%   69.00%   -0.01%     
==========================================
  Files          89       89              
  Lines       27770    27768       -2     
==========================================
- Hits        19165    19162       -3     
- Misses       8605     8606       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@nurupo nurupo left a comment

Choose a reason for hiding this comment

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

Reviewed 31 of 31 files at r1, all commit messages.
Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @iphydf)


other/analysis/run-cppcheck line 31 at r1 (raw file):

CPPCHECK_CXX+=("--suppress=shadowFunction")
# False positive in group.c.
CPPCHECK_CXX+=("--suppress=AssignmentAddressToInteger")

Instead of suppressing it codebase-wide, maybe add an inline comment to the offending code line telling cppcheck to ignore it?

Also started teaching it about toxcore's alloc/dealloc functions in
hopes of it catching some errors (it doesn't seem to be very good at
this, but maybe better than nothing?).
Copy link
Member Author

@iphydf iphydf left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 change requests, 0 of 1 approvals obtained (waiting on @nurupo)


other/analysis/run-cppcheck line 31 at r1 (raw file):

Previously, nurupo wrote…

Instead of suppressing it codebase-wide, maybe add an inline comment to the offending code line telling cppcheck to ignore it?

Good idea, but it didn't work. Updated the comment.

@iphydf iphydf assigned nurupo and unassigned iphydf Dec 27, 2023
Copy link
Member

@nurupo nurupo left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 1 approvals obtained

@pull-request-attention pull-request-attention bot assigned iphydf and unassigned nurupo Dec 27, 2023
@toktok-releaser toktok-releaser merged commit b7f9367 into TokTok:master Dec 27, 2023
53 checks passed
@iphydf iphydf deleted the cppcheck branch December 27, 2023 01:04
This pull request was closed.
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.

3 participants