Skip to content

fix(net): Fix build warnings (dead_code false positives) #543

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

Merged
merged 1 commit into from
Jun 3, 2025

Conversation

qmonnet
Copy link
Member

@qmonnet qmonnet commented Jun 3, 2025

🚨 Required to fix current CI failures on dev.yml with nightly toolchain

It seems that rustc is not able to tell we're using MacTestStringGenerator and CommonHeaders through the .with_generator() method. Let's tell it to ignore dead code for these structs.

Fixes: 613cf78 ("feat(net): Add Mac::try_from::<&str>()")
Fixes: e1b8198 ("test(net): Add fuzz tests for parsing packet headers")

It seems that rustc is not able to tell we're using
MacTestStringGenerator and CommonHeaders through the .with_generator()
method. Let's tell it to ignore dead code for these structs.

Fixes: 613cf78 ("feat(net): Add Mac::try_from::<&str>()")
Fixes: e1b8198 ("test(net): Add fuzz tests for parsing packet headers")
Signed-off-by: Quentin Monnet <[email protected]>
@qmonnet qmonnet added this to the GW R1 milestone Jun 3, 2025
@qmonnet qmonnet requested a review from mvachhar June 3, 2025 12:43
@qmonnet qmonnet self-assigned this Jun 3, 2025
@qmonnet qmonnet requested a review from a team as a code owner June 3, 2025 12:43
@qmonnet qmonnet added the bug Something isn't working label Jun 3, 2025
@qmonnet
Copy link
Member Author

qmonnet commented Jun 3, 2025

If anyone can figure out why we failed to detect these in https://github.com/githedgehog/dataplane/actions/runs/15316095639/job/43090156535 before #536 was merged, I'm interested. The probability that rustc nightly changed between the two on this particular aspect is low.

@mvachhar mvachhar added this pull request to the merge queue Jun 3, 2025
Merged via the queue into main with commit ec58837 Jun 3, 2025
18 checks passed
@mvachhar mvachhar deleted the pr/qmonnet/fix-build-warnings branch June 3, 2025 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants