-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Warnint util 4516 v4 #6820
Warnint util 4516 v4 #6820
Conversation
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Ticket: 4516
Codecov Report
@@ Coverage Diff @@
## master #6820 +/- ##
==========================================
- Coverage 77.66% 77.39% -0.28%
==========================================
Files 620 620
Lines 187159 187149 -10
==========================================
- Hits 145365 144851 -514
- Misses 41794 42298 +504
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information:
Pipeline 5805 |
|
||
return l; | ||
return (uint16_t)l; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonish any thoughts here? IIRC this func was introduced by you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an easy one, without knowing the function's purpose
l = l & 65535; return l;
does the same thing as return (uint16_t)l;
(right ?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess I'm not actually sure what C is doing (and/or expected to do here), esp since this code IIRC comes from OpenBSD. They seem to know a thing or 2 about this stuff.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
l = l & 65535; return l;
does the same thing asreturn (uint16_t)l;
(right ?)
A quick test shows that they do the same thing, but its not nearly as clear to me as the original form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you prefer l = l & 65535; (uint16_t)return l;
? (even if it is redundant)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, at least its clear.. Would this work as well?
return (uint16_t)(l & 65535);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok for me
Any thoughts on the CIFuzz find ?
|
Can you do a PR with this so we can review it properly? I think adding new patch suggestions in PR comments isn't very effective for review/discussion. |
Done in #7006 But I was rather under the impression that we should split this big PR into smaller PRs... |
Sure you can split PRs or do PRs for smaller changes, right? Suggesting code changes in comments instead of a PR just seems to be an anti-pattern when the PR is to review code changes in git. |
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4516
Describe changes:
-Wimplicit-int-conversion
in all filesExtends #6792 : complete with CI check...
Replaces #6807 with completion for all files
Thoughts about the commit history ?
This PR can be split into smaller PRs as some points need a careful review (detect-content.c for instance)