From 7c1bfeffe8988bb60020d6b61ee0f10aa5f1e1e7 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sat, 6 Jan 2024 08:28:43 -0500 Subject: [PATCH 1/2] aya: appease nightly lint ``` error: lint `unused_tuple_struct_fields` has been renamed to `dead_code` --> aya/src/lib.rs:74:5 | 74 | unused_tuple_struct_fields, | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `dead_code` | = note: `-D renamed-and-removed-lints` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(renamed_and_removed_lints)]` ``` See https://github.com/rust-lang/rust/commit/9fcf9c141068984ffcbb4cb00c. --- aya/src/lib.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/aya/src/lib.rs b/aya/src/lib.rs index 743ea26d..ece5ebc9 100644 --- a/aya/src/lib.rs +++ b/aya/src/lib.rs @@ -71,7 +71,6 @@ unused_macro_rules, unused_qualifications, //unused_results, - unused_tuple_struct_fields, )] #![allow(clippy::missing_safety_doc, clippy::len_without_is_empty)] #![cfg_attr( From 9861c1446efbd7303bf9485c864d5a00853368bd Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Sat, 6 Jan 2024 08:45:32 -0500 Subject: [PATCH 2/2] bpf: appease nightly lint ``` error: field `0` is never read --> bpf/aya-bpf/src/helpers.rs:737:22 | 737 | pub struct PrintkArg(u64); | --------- ^^^ | | | field in this struct | = note: `PrintkArg` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field | 737 | pub struct PrintkArg(()); | ~~ ``` See https://github.com/rust-lang/rust/issues/119659. --- bpf/aya-bpf/src/helpers.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bpf/aya-bpf/src/helpers.rs b/bpf/aya-bpf/src/helpers.rs index 169c83ac..a315c74a 100644 --- a/bpf/aya-bpf/src/helpers.rs +++ b/bpf/aya-bpf/src/helpers.rs @@ -734,7 +734,10 @@ pub use bpf_printk; /// Argument ready to be passed to `printk` BPF helper. #[repr(transparent)] #[derive(Copy, Clone)] -pub struct PrintkArg(u64); +pub struct PrintkArg( + #[allow(dead_code)] // TODO(https://github.com/rust-lang/rust/issues/119659): Remove. + u64, +); impl PrintkArg { /// Manually construct a `printk` BPF helper argument.