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

Remove unused includes #1604

Merged
merged 8 commits into from
Oct 5, 2024
Merged

Remove unused includes #1604

merged 8 commits into from
Oct 5, 2024

Conversation

seladb
Copy link
Owner

@seladb seladb commented Oct 4, 2024

No description provided.

@Dimi1010
Copy link
Collaborator

Dimi1010 commented Oct 4, 2024

Just FYI, CI is failing because that all the headers like <cstring> only guarantee to declare their contents within the std namespace, while the old c headers like <string.h> only guarantee to have their contents in the global namespace. So some functions might need adjustments to use the std:: version.

Copy link

codecov bot commented Oct 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.10%. Comparing base (44972d0) to head (76a7d54).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1604      +/-   ##
==========================================
- Coverage   83.12%   83.10%   -0.02%     
==========================================
  Files         276      276              
  Lines       46907    46907              
  Branches     9402     9536     +134     
==========================================
- Hits        38991    38983       -8     
- Misses       7060     7091      +31     
+ Partials      856      833      -23     
Flag Coverage Δ
fedora40 74.67% <ø> (-0.05%) ⬇️
macos-12 81.09% <ø> (-0.01%) ⬇️
macos-13 80.53% <ø> (ø)
macos-14 80.45% <ø> (ø)
mingw32 70.63% <ø> (ø)
mingw64 70.60% <ø> (ø)
npcap 85.02% <ø> (ø)
rhel94 74.56% <ø> (-0.04%) ⬇️
ubuntu2004 57.93% <ø> (ø)
ubuntu2004-zstd 58.06% <ø> (+<0.01%) ⬆️
ubuntu2204 74.49% <ø> (+<0.01%) ⬆️
ubuntu2204-icpx 58.70% <ø> (ø)
ubuntu2404 74.74% <ø> (ø)
unittest 83.10% <ø> (-0.02%) ⬇️
windows-2019 85.05% <ø> (ø)
windows-2022 85.06% <ø> (ø)
winpcap 85.02% <ø> (-0.02%) ⬇️
xdp 49.66% <ø> (+<0.01%) ⬆️

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

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

@seladb
Copy link
Owner Author

seladb commented Oct 4, 2024

Just FYI, CI is failing because that all the headers like <cstring> only guarantee to declare their contents within the std namespace, while the old c headers like <string.h> only guarantee to have their contents in the global namespace. So some functions might need adjustments to use the std:: version.

Yes, I'm still working on this PR 🙂

@egecetin
Copy link
Collaborator

egecetin commented Oct 4, 2024

@seladb What about also adding https://github.com/include-what-you-use/include-what-you-use after fix all of them. I don't have experience with it, but do you already know or use it?

Copy link
Collaborator

@tigercosmos tigercosmos left a comment

Choose a reason for hiding this comment

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

LGTM

@seladb
Copy link
Owner Author

seladb commented Oct 5, 2024

@seladb What about also adding https://github.com/include-what-you-use/include-what-you-use after fix all of them. I don't have experience with it, but do you already know or use it?

I've never used it, but I can look into it. Probably in a separate PR?

@egecetin
Copy link
Collaborator

egecetin commented Oct 5, 2024

@seladb Separate PR is better, I think. Because it might need additional config which will mix this PR.

@seladb seladb marked this pull request as ready for review October 5, 2024 08:11
@tigercosmos tigercosmos merged commit 9130bf1 into dev Oct 5, 2024
40 checks passed
@tigercosmos tigercosmos deleted the unused-imports branch October 5, 2024 17:55
fxlb pushed a commit to fxlb/PcapPlusPlus that referenced this pull request Oct 22, 2024
* Remove unused includes

* Fix

* Add back `cstring` where needed

* Remove unused includes from examples and tutorials

* Add `cstdlib`

* Remove unused includes for DPDK

* Remove unused includes for PF_RING

* Remove one more unused include for PF_RING
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.

4 participants