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

rust: remove unused #9498

Closed
wants to merge 1 commit into from
Closed

Conversation

catenacyber
Copy link
Contributor

Link to redmine ticket:
None, generic cleaning
https://redmine.openinfosecfoundation.org/issues/4083

Describe changes:

  • rust: remove unused dead code

Found with
git grep 'pub ' rust/src/ | cut -d: -f1 | uniq | xargs sed -i -e 's/pub /pub(crate) /' then see rust warnings when compiling

There is nothing more to be done :

  • There are parsed fields which get never used. (like rrclass in DNSQueryEntry) : I feel good to keep them

Rebase #9419

@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #9498 (2a7d689) into master (af4bb91) will decrease coverage by 0.02%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9498      +/-   ##
==========================================
- Coverage   82.18%   82.17%   -0.02%     
==========================================
  Files         968      968              
  Lines      274203   274200       -3     
==========================================
- Hits       225352   225321      -31     
- Misses      48851    48879      +28     
Flag Coverage Δ
fuzzcorpus 64.04% <ø> (-0.04%) ⬇️
suricata-verify 60.89% <ø> (-0.01%) ⬇️
unittests 62.88% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@suricata-qa
Copy link

WARNING:

field baseline test %
ASAN_TLPR1_suri

Pipeline 15992

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 16043

@victorjulien victorjulien added this to the 8.0 milestone Sep 27, 2023
@@ -38,54 +38,12 @@ pub const DCERPC_UUID_ENTRY_FLAG_FF: u16 = 0x0001;
pub const PFC_FIRST_FRAG: u8 = 0x01;
// Value to indicate last fragment
pub const PFC_LAST_FRAG: u8 = 0x02;
// Cancel was pending at sender
Copy link
Member

Choose a reason for hiding this comment

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

I don't really see defines like this as dead code, would rather have them stay. It will make things easier when support is added.

Copy link
Member

Choose a reason for hiding this comment

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

Could we use a rather Rusty convention and prefix with with _ so its clear to the reader they are not used? And perhaps awaiting use?

Copy link
Member

Choose a reason for hiding this comment

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

That would work for me

Copy link
Member

@victorjulien victorjulien left a comment

Choose a reason for hiding this comment

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

see inline comments

@catenacyber catenacyber mentioned this pull request Nov 19, 2023
@catenacyber
Copy link
Contributor Author

Going on with #9842

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants