-
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
rust: don't suppress static_mut_refs globally - v3 #12680
Conversation
It doesn't appear to be needed. The vec being cleared is only set once per run, so never needs to be cleared. Removes one point where we have to supress the static_mut_refs compiler warning. Ticket: OISF#7417
Allows us to get rid of the global supression. Ticket: OISF#7417
Simply wrapping in a function removes static_mut_refs compiler warning. Ticket: OISF#7417
As references to static mutables are highly discouraged, remove the global suppressing of the compiler warning. Each use case can be suppressed as needed. Ticket: OISF#7417
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #12680 +/- ##
=======================================
Coverage 80.75% 80.76%
=======================================
Files 934 934
Lines 259594 259604 +10
=======================================
+ Hits 209634 209664 +30
+ Misses 49960 49940 -20
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 24921 |
@@ -383,7 +382,6 @@ static void SMTPConfigure(void) { | |||
} else { | |||
/* Add default extract url scheme 'http' since | |||
* extract-urls-schemes wasn't found in the config */ | |||
SCMimeSmtpConfigExtractUrlsSchemeReset(); |
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.
Thanks I think I used this while trying to have a fuzz target that reload the configuration for each input
Merged in #12685, thanks! |
As its use is now a default compiler warning, and eventually will become an
error, remove the global suppression of it. Instead suppress as needed, or
refactor to get rid of the warning.
For reference:
https://doc.rust-lang.org/nightly/edition-guide/rust-2024/static-mut-references.html,
Ticket: https://redmine.openinfosecfoundation.org/issues/7417