[INFO] cloning repository https://github.com/favilo/rpi-ws2811-smi-rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/favilo/rpi-ws2811-smi-rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffavilo%2Frpi-ws2811-smi-rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffavilo%2Frpi-ws2811-smi-rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 26e4110e7489f4dcc4e43196c7cf80249e0aeb9e [INFO] linting favilo/rpi-ws2811-smi-rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Ffavilo%2Frpi-ws2811-smi-rust" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] removed /workspace/builds/worker-7-tc1/source/.cargo/config.toml [INFO] started tweaking git repo https://github.com/favilo/rpi-ws2811-smi-rust [INFO] finished tweaking git repo https://github.com/favilo/rpi-ws2811-smi-rust [INFO] tweaked toml for git repo https://github.com/favilo/rpi-ws2811-smi-rust written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/favilo/rpi-ws2811-smi-rust on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/favilo/rpi-ws2811-smi-rust already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded memmap2 v0.9.0 [INFO] [stderr] Downloaded c2rust-bitfields v0.18.0 [INFO] [stderr] Downloaded c2rust-bitfields-derive v0.18.0 [INFO] [stderr] Downloaded bindgen v0.68.1 [INFO] [stderr] Downloaded rustix v0.38.20 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 0a4db22110cac0e4b0f7f963e2cf679fa870ff7bf27f56dfe9e962903b44a3da [INFO] running `Command { std: "docker" "start" "-a" "0a4db22110cac0e4b0f7f963e2cf679fa870ff7bf27f56dfe9e962903b44a3da", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "0a4db22110cac0e4b0f7f963e2cf679fa870ff7bf27f56dfe9e962903b44a3da", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0a4db22110cac0e4b0f7f963e2cf679fa870ff7bf27f56dfe9e962903b44a3da", kill_on_drop: false }` [INFO] [stdout] 0a4db22110cac0e4b0f7f963e2cf679fa870ff7bf27f56dfe9e962903b44a3da [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4c106e08f4b0c41ad0a7e4259271d3f7b4fa406aaa7a217982321448129ebe49 [INFO] running `Command { std: "docker" "start" "-a" "4c106e08f4b0c41ad0a7e4259271d3f7b4fa406aaa7a217982321448129ebe49", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.69 [INFO] [stderr] Compiling libc v0.2.149 [INFO] [stderr] Compiling rustix v0.38.20 [INFO] [stderr] Compiling prettyplease v0.2.15 [INFO] [stderr] Compiling linux-raw-sys v0.4.10 [INFO] [stderr] Compiling regex-syntax v0.8.2 [INFO] [stderr] Compiling bitflags v2.4.1 [INFO] [stderr] Compiling memchr v2.6.4 [INFO] [stderr] Compiling home v0.5.5 [INFO] [stderr] Compiling either v1.9.0 [INFO] [stderr] Compiling bindgen v0.68.1 [INFO] [stderr] Compiling clang-sys v1.6.1 [INFO] [stderr] Compiling libloading v0.7.4 [INFO] [stderr] Compiling shlex v1.2.0 [INFO] [stderr] Compiling thiserror v1.0.49 [INFO] [stderr] Compiling anyhow v1.0.75 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Compiling nom v7.1.3 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Compiling quote v1.0.33 [INFO] [stderr] Compiling syn v2.0.38 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking memmap2 v0.9.0 [INFO] [stderr] Checking nix v0.27.1 [INFO] [stderr] Compiling which v4.4.2 [INFO] [stderr] Compiling cexpr v0.6.0 [INFO] [stderr] Compiling regex-automata v0.4.3 [INFO] [stderr] Compiling regex v1.10.2 [INFO] [stderr] Compiling c2rust-bitfields-derive v0.18.0 [INFO] [stderr] Checking c2rust-bitfields v0.18.0 [INFO] [stderr] Compiling thiserror-impl v1.0.49 [INFO] [stderr] Compiling rpi_ws2811_smi v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused imports: `env` and `path::PathBuf` [INFO] [stdout] --> build.rs:1:11 [INFO] [stdout] | [INFO] [stdout] 1 | use std::{env, path::PathBuf}; [INFO] [stdout] | ^^^ ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:3:7 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(rpi4)] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | #[cfg(not(rpi4))] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:42:7 [INFO] [stdout] | [INFO] [stdout] 42 | #[cfg(rpi4)] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi23` [INFO] [stdout] --> src/consts.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | #[cfg(rpi23)] [INFO] [stdout] | ^^^^^ help: found config with similar value: `feature = "rpi23"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi23)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi23)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi23` [INFO] [stdout] --> src/consts.rs:46:15 [INFO] [stdout] | [INFO] [stdout] 46 | #[cfg(not(any(rpi23, rpi4)))] [INFO] [stdout] | ^^^^^ help: found config with similar value: `feature = "rpi23"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi23)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi23)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | #[cfg(not(any(rpi23, rpi4)))] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `DMA_REG` [INFO] [stdout] --> src/c2rust/dma_defs.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | macro_rules! DMA_REG { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `DMA_PRIORITY` [INFO] [stdout] --> src/c2rust/dma_defs.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | macro_rules! DMA_PRIORITY { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DMA_PRIORITY` and `DMA_REG` [INFO] [stdout] --> src/c2rust/dma_defs.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | pub(crate) use {DMA_PRIORITY, DMA_REG}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `BUS_PHYS_ADDR` [INFO] [stdout] --> src/c2rust/dma_defs.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | macro_rules! BUS_PHYS_ADDR { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BUS_PHYS_ADDR` [INFO] [stdout] --> src/c2rust/dma_defs.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 73 | pub(crate) use {BUS_PHYS_ADDR, MEM_BUS_ADDR, REG_BUS_ADDR}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | size + 0x1000 as libc::c_int & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | size + 0x1000 as libc::c_int & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:225:10 [INFO] [stdout] | [INFO] [stdout] 225 | ((1 as libc::c_int) << pin % 32 as libc::c_int) as uint32_t, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(1 as libc::c_int) << (pin % 32 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:256:10 [INFO] [stdout] | [INFO] [stdout] 256 | ((1 as libc::c_int) << pin % 32 as libc::c_int) as uint32_t, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(1 as libc::c_int) << (pin % 32 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | return (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `*reg >> (pin % 32 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:274:29 [INFO] [stdout] | [INFO] [stdout] 274 | gpio_mode_strs[(mode >> i * 3 as libc::c_int & 7 as libc::c_int as uint32_t) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `mode >> (i * 3 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:659:9 [INFO] [stdout] | [INFO] [stdout] 659 | size + 0x1000 as libc::c_int & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:699:17 [INFO] [stdout] | [INFO] [stdout] 699 | / size + 0x1000 as libc::c_int [INFO] [stdout] 700 | | & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | |_________________________________________________________________^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `set_bits` [INFO] [stdout] --> src/c2rust/smi_defs.rs:218:14 [INFO] [stdout] | [INFO] [stdout] 218 | macro_rules! set_bits { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `set_bits` [INFO] [stdout] --> src/c2rust/smi_defs.rs:225:17 [INFO] [stdout] | [INFO] [stdout] 225 | pub(crate) use {set_bits, REG32}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ptr::write_volatile` [INFO] [stdout] --> src/c2rust/smileds.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::ptr::write_volatile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:3:7 [INFO] [stdout] | [INFO] [stdout] 3 | #[cfg(rpi4)] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:5:11 [INFO] [stdout] | [INFO] [stdout] 5 | #[cfg(not(rpi4))] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:42:7 [INFO] [stdout] | [INFO] [stdout] 42 | #[cfg(rpi4)] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi23` [INFO] [stdout] --> src/consts.rs:44:7 [INFO] [stdout] | [INFO] [stdout] 44 | #[cfg(rpi23)] [INFO] [stdout] | ^^^^^ help: found config with similar value: `feature = "rpi23"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi23)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi23)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi23` [INFO] [stdout] --> src/consts.rs:46:15 [INFO] [stdout] | [INFO] [stdout] 46 | #[cfg(not(any(rpi23, rpi4)))] [INFO] [stdout] | ^^^^^ help: found config with similar value: `feature = "rpi23"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi23)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi23)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `rpi4` [INFO] [stdout] --> src/consts.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | #[cfg(not(any(rpi23, rpi4)))] [INFO] [stdout] | ^^^^ help: found config with similar value: `feature = "rpi4"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(rpi4)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(rpi4)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `DMA_REG` [INFO] [stdout] --> src/c2rust/dma_defs.rs:35:14 [INFO] [stdout] | [INFO] [stdout] 35 | macro_rules! DMA_REG { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_macros)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `DMA_PRIORITY` [INFO] [stdout] --> src/c2rust/dma_defs.rs:45:14 [INFO] [stdout] | [INFO] [stdout] 45 | macro_rules! DMA_PRIORITY { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DMA_PRIORITY` and `DMA_REG` [INFO] [stdout] --> src/c2rust/dma_defs.rs:51:17 [INFO] [stdout] | [INFO] [stdout] 51 | pub(crate) use {DMA_PRIORITY, DMA_REG}; [INFO] [stdout] | ^^^^^^^^^^^^ ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `BUS_PHYS_ADDR` [INFO] [stdout] --> src/c2rust/dma_defs.rs:61:14 [INFO] [stdout] | [INFO] [stdout] 61 | macro_rules! BUS_PHYS_ADDR { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `BUS_PHYS_ADDR` [INFO] [stdout] --> src/c2rust/dma_defs.rs:73:17 [INFO] [stdout] | [INFO] [stdout] 73 | pub(crate) use {BUS_PHYS_ADDR, MEM_BUS_ADDR, REG_BUS_ADDR}; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:135:9 [INFO] [stdout] | [INFO] [stdout] 135 | size + 0x1000 as libc::c_int & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] = note: `#[warn(clippy::precedence)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:154:9 [INFO] [stdout] | [INFO] [stdout] 154 | size + 0x1000 as libc::c_int & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:225:10 [INFO] [stdout] | [INFO] [stdout] 225 | ((1 as libc::c_int) << pin % 32 as libc::c_int) as uint32_t, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(1 as libc::c_int) << (pin % 32 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:256:10 [INFO] [stdout] | [INFO] [stdout] 256 | ((1 as libc::c_int) << pin % 32 as libc::c_int) as uint32_t, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(1 as libc::c_int) << (pin % 32 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:264:13 [INFO] [stdout] | [INFO] [stdout] 264 | return (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `*reg >> (pin % 32 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:274:29 [INFO] [stdout] | [INFO] [stdout] 274 | gpio_mode_strs[(mode >> i * 3 as libc::c_int & 7 as libc::c_int as uint32_t) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `mode >> (i * 3 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:659:9 [INFO] [stdout] | [INFO] [stdout] 659 | size + 0x1000 as libc::c_int & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: operator precedence might not be obvious [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:699:17 [INFO] [stdout] | [INFO] [stdout] 699 | / size + 0x1000 as libc::c_int [INFO] [stdout] 700 | | & !(0x1000 as libc::c_int - 1 as libc::c_int) [INFO] [stdout] | |_________________________________________________________________^ help: consider parenthesizing your expression: `(size + 0x1000 as libc::c_int) & !(0x1000 as libc::c_int - 1 as libc::c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused macro definition: `set_bits` [INFO] [stdout] --> src/c2rust/smi_defs.rs:218:14 [INFO] [stdout] | [INFO] [stdout] 218 | macro_rules! set_bits { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `set_bits` [INFO] [stdout] --> src/c2rust/smi_defs.rs:225:17 [INFO] [stdout] | [INFO] [stdout] 225 | pub(crate) use {set_bits, REG32}; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::ptr::write_volatile` [INFO] [stdout] --> src/c2rust/smileds.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | use std::ptr::write_volatile; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BUS_REG_BASE` is never used [INFO] [stdout] --> src/consts.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | pub(crate) const BUS_REG_BASE: *mut c_void = 0x7E000000 as *mut c_void; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CHAN_A` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) const DMA_CHAN_A: usize = 10; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CHAN_B` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | pub(crate) const DMA_CHAN_B: usize = 11; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_PWM_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | pub(crate) const DMA_PWM_DREQ: usize = 5; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SPI_TX_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) const DMA_SPI_TX_DREQ: usize = 6; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SPI_RX_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) const DMA_SPI_RX_DREQ: usize = 7; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_BASE` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | pub(crate) const DMA_BASE: *const c_void = PHYS_REG_BASE.wrapping_offset(0x007000); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CS` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | pub(crate) const DMA_CS: usize = 0x00; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CONBLK_AD` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | pub(crate) const DMA_CONBLK_AD: usize = 0x04; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_TI` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | pub(crate) const DMA_TI: usize = 0x08; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SRCE_AD` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | pub(crate) const DMA_SRCE_AD: usize = 0x0c; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_DEST_AD` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | pub(crate) const DMA_DEST_AD: usize = 0x10; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_TXFR_LEN` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) const DMA_TXFR_LEN: usize = 0x14; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_STRIDE` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | pub(crate) const DMA_STRIDE: usize = 0x18; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_NEXTCONBK` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | pub(crate) const DMA_NEXTCONBK: usize = 0x1c; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_DEBUG` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | pub(crate) const DMA_DEBUG: usize = 0x20; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_ENABLE` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | pub(crate) const DMA_ENABLE: usize = 0xff0; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CB_DEST_INC` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | pub(crate) const DMA_CB_DEST_INC: usize = 1 << 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SRCE_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | pub(crate) const DMA_SRCE_DREQ: usize = 1 << 10; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSR1` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | pub(crate) const SMI_DSR1: usize = 0x18; // Read settings device 1 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSW1` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | pub(crate) const SMI_DSW1: usize = 0x1c; // Write settings device 1 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSR2` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) const SMI_DSR2: usize = 0x20; // Read settings device 2 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSW2` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | pub(crate) const SMI_DSW2: usize = 0x24; // Write settings device 2 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSR3` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | pub(crate) const SMI_DSR3: usize = 0x28; // Read settings device 3 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSW3` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | pub(crate) const SMI_DSW3: usize = 0x2c; // Write settings device 3 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_FD` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) const SMI_FD: usize = 0x40; // FIFO debug [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_18_BITS` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:229:18 [INFO] [stdout] | [INFO] [stdout] 229 | pub(crate) const SMI_18_BITS: usize = 2; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_9_BITS` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:230:18 [INFO] [stdout] | [INFO] [stdout] 230 | pub(crate) const SMI_9_BITS: usize = 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/error.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | IoError(#[from] std::io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/error.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | VideoCoreError, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/error.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | VideoCorePartialError, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:93:10 [INFO] [stdout] | [INFO] [stdout] 93 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] = note: `#[warn(clippy::zero_ptr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:94:11 [INFO] [stdout] | [INFO] [stdout] 94 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:95:11 [INFO] [stdout] | [INFO] [stdout] 95 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:102:10 [INFO] [stdout] | [INFO] [stdout] 102 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:103:11 [INFO] [stdout] | [INFO] [stdout] 103 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:104:11 [INFO] [stdout] | [INFO] [stdout] 104 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:112:11 [INFO] [stdout] | [INFO] [stdout] 112 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:113:11 [INFO] [stdout] | [INFO] [stdout] 113 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:120:10 [INFO] [stdout] | [INFO] [stdout] 120 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:121:11 [INFO] [stdout] | [INFO] [stdout] 121 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | return (*mp).virt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - return (*mp).virt; [INFO] [stdout] 142 + (*mp).virt [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | return ret; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 188 - return ret; [INFO] [stdout] 188 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:149:38 [INFO] [stdout] | [INFO] [stdout] 149 | let mut ret: *mut libc::c_void = 0 as *mut libc::c_void; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | 0 as *mut libc::c_void [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:264:5 [INFO] [stdout] | [INFO] [stdout] 264 | return (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 264 - return (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t; [INFO] [stdout] 264 + (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:292:5 [INFO] [stdout] | [INFO] [stdout] 292 | return fd; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 292 - return fd; [INFO] [stdout] 292 + fd [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | return ret; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 338 - return ret; [INFO] [stdout] 338 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `BUS_REG_BASE` is never used [INFO] [stdout] --> src/consts.rs:52:18 [INFO] [stdout] | [INFO] [stdout] 52 | pub(crate) const BUS_REG_BASE: *mut c_void = 0x7E000000 as *mut c_void; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CHAN_A` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:6:18 [INFO] [stdout] | [INFO] [stdout] 6 | pub(crate) const DMA_CHAN_A: usize = 10; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CHAN_B` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:7:18 [INFO] [stdout] | [INFO] [stdout] 7 | pub(crate) const DMA_CHAN_B: usize = 11; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_PWM_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:8:18 [INFO] [stdout] | [INFO] [stdout] 8 | pub(crate) const DMA_PWM_DREQ: usize = 5; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SPI_TX_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:9:18 [INFO] [stdout] | [INFO] [stdout] 9 | pub(crate) const DMA_SPI_TX_DREQ: usize = 6; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SPI_RX_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:10:18 [INFO] [stdout] | [INFO] [stdout] 10 | pub(crate) const DMA_SPI_RX_DREQ: usize = 7; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_BASE` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:11:18 [INFO] [stdout] | [INFO] [stdout] 11 | pub(crate) const DMA_BASE: *const c_void = PHYS_REG_BASE.wrapping_offset(0x007000); [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CS` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:13:18 [INFO] [stdout] | [INFO] [stdout] 13 | pub(crate) const DMA_CS: usize = 0x00; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CONBLK_AD` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:14:18 [INFO] [stdout] | [INFO] [stdout] 14 | pub(crate) const DMA_CONBLK_AD: usize = 0x04; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_TI` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:15:18 [INFO] [stdout] | [INFO] [stdout] 15 | pub(crate) const DMA_TI: usize = 0x08; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SRCE_AD` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | pub(crate) const DMA_SRCE_AD: usize = 0x0c; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_DEST_AD` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | pub(crate) const DMA_DEST_AD: usize = 0x10; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_TXFR_LEN` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) const DMA_TXFR_LEN: usize = 0x14; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_STRIDE` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | pub(crate) const DMA_STRIDE: usize = 0x18; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:392:5 [INFO] [stdout] | [INFO] [stdout] 392 | return msg_mbox(fd, &mut msg); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 392 - return msg_mbox(fd, &mut msg); [INFO] [stdout] 392 + msg_mbox(fd, &mut msg) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_NEXTCONBK` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | pub(crate) const DMA_NEXTCONBK: usize = 0x1c; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_DEBUG` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | pub(crate) const DMA_DEBUG: usize = 0x20; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_ENABLE` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:22:18 [INFO] [stdout] | [INFO] [stdout] 22 | pub(crate) const DMA_ENABLE: usize = 0xff0; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_CB_DEST_INC` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:27:18 [INFO] [stdout] | [INFO] [stdout] 27 | pub(crate) const DMA_CB_DEST_INC: usize = 1 << 4; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `DMA_SRCE_DREQ` is never used [INFO] [stdout] --> src/c2rust/dma_defs.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | pub(crate) const DMA_SRCE_DREQ: usize = 1 << 10; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSR1` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | pub(crate) const SMI_DSR1: usize = 0x18; // Read settings device 1 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSW1` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:17:18 [INFO] [stdout] | [INFO] [stdout] 17 | pub(crate) const SMI_DSW1: usize = 0x1c; // Write settings device 1 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSR2` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:18:18 [INFO] [stdout] | [INFO] [stdout] 18 | pub(crate) const SMI_DSR2: usize = 0x20; // Read settings device 2 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:390:9 [INFO] [stdout] | [INFO] [stdout] 347 | / let mut init = VC_MSG { [INFO] [stdout] 348 | | len: 0, [INFO] [stdout] 349 | | req: 0, [INFO] [stdout] 350 | | tag: 0x3000c as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 388 | | ], [INFO] [stdout] 389 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 390 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 347 ~ [INFO] [stdout] 348 ~ VC_MSG { [INFO] [stdout] 349 + len: 0, [INFO] [stdout] 350 + req: 0, [INFO] [stdout] 351 + tag: 0x3000c as libc::c_int as uint32_t, [INFO] [stdout] 352 + blen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 353 + dlen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 354 + uints: [ [INFO] [stdout] 355 + if size % 0x1000 as libc::c_int as uint32_t [INFO] [stdout] 356 + == 0 as libc::c_int as uint32_t [INFO] [stdout] 357 + { [INFO] [stdout] 358 + size [INFO] [stdout] 359 + } else { [INFO] [stdout] 360 + size.wrapping_add(0x1000 as libc::c_int as uint32_t) [INFO] [stdout] 361 + & !(0x1000 as libc::c_int - 1 as libc::c_int) as uint32_t [INFO] [stdout] 362 + }, [INFO] [stdout] 363 + 0x1000 as libc::c_int as uint32_t, [INFO] [stdout] 364 + flags as uint32_t, [INFO] [stdout] 365 + 0, [INFO] [stdout] 366 + 0, [INFO] [stdout] 367 + 0, [INFO] [stdout] 368 + 0, [INFO] [stdout] 369 + 0, [INFO] [stdout] 370 + 0, [INFO] [stdout] 371 + 0, [INFO] [stdout] 372 + 0, [INFO] [stdout] 373 + 0, [INFO] [stdout] 374 + 0, [INFO] [stdout] 375 + 0, [INFO] [stdout] 376 + 0, [INFO] [stdout] 377 + 0, [INFO] [stdout] 378 + 0, [INFO] [stdout] 379 + 0, [INFO] [stdout] 380 + 0, [INFO] [stdout] 381 + 0, [INFO] [stdout] 382 + 0, [INFO] [stdout] 383 + 0, [INFO] [stdout] 384 + 0, [INFO] [stdout] 385 + 0, [INFO] [stdout] 386 + 0, [INFO] [stdout] 387 + 0, [INFO] [stdout] 388 + 0, [INFO] [stdout] 389 + ], [INFO] [stdout] 390 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSW2` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:19:18 [INFO] [stdout] | [INFO] [stdout] 19 | pub(crate) const SMI_DSW2: usize = 0x24; // Write settings device 2 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSR3` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:20:18 [INFO] [stdout] | [INFO] [stdout] 20 | pub(crate) const SMI_DSR3: usize = 0x28; // Read settings device 3 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_DSW3` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:21:18 [INFO] [stdout] | [INFO] [stdout] 21 | pub(crate) const SMI_DSW3: usize = 0x2c; // Write settings device 3 [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_FD` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:26:18 [INFO] [stdout] | [INFO] [stdout] 26 | pub(crate) const SMI_FD: usize = 0x40; // FIFO debug [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_18_BITS` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:229:18 [INFO] [stdout] | [INFO] [stdout] 229 | pub(crate) const SMI_18_BITS: usize = 2; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `SMI_9_BITS` is never used [INFO] [stdout] --> src/c2rust/smi_defs.rs:230:18 [INFO] [stdout] | [INFO] [stdout] 230 | pub(crate) const SMI_9_BITS: usize = 3; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:438:5 [INFO] [stdout] | [INFO] [stdout] 438 | / return if h != 0 { [INFO] [stdout] 439 | | msg_mbox(fd, &mut msg) as *mut libc::c_void [INFO] [stdout] 440 | | } else { [INFO] [stdout] 441 | | 0 as *mut libc::c_void [INFO] [stdout] 442 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 438 ~ if h != 0 { [INFO] [stdout] 439 + msg_mbox(fd, &mut msg) as *mut libc::c_void [INFO] [stdout] 440 + } else { [INFO] [stdout] 441 + 0 as *mut libc::c_void [INFO] [stdout] 442 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 400 | / let mut init = VC_MSG { [INFO] [stdout] 401 | | len: 0, [INFO] [stdout] 402 | | req: 0, [INFO] [stdout] 403 | | tag: 0x3000d as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 434 | | ], [INFO] [stdout] 435 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 436 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 400 ~ [INFO] [stdout] 401 ~ VC_MSG { [INFO] [stdout] 402 + len: 0, [INFO] [stdout] 403 + req: 0, [INFO] [stdout] 404 + tag: 0x3000d as libc::c_int as uint32_t, [INFO] [stdout] 405 + blen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 406 + dlen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 407 + uints: [ [INFO] [stdout] 408 + h as uint32_t, [INFO] [stdout] 409 + 0, [INFO] [stdout] 410 + 0, [INFO] [stdout] 411 + 0, [INFO] [stdout] 412 + 0, [INFO] [stdout] 413 + 0, [INFO] [stdout] 414 + 0, [INFO] [stdout] 415 + 0, [INFO] [stdout] 416 + 0, [INFO] [stdout] 417 + 0, [INFO] [stdout] 418 + 0, [INFO] [stdout] 419 + 0, [INFO] [stdout] 420 + 0, [INFO] [stdout] 421 + 0, [INFO] [stdout] 422 + 0, [INFO] [stdout] 423 + 0, [INFO] [stdout] 424 + 0, [INFO] [stdout] 425 + 0, [INFO] [stdout] 426 + 0, [INFO] [stdout] 427 + 0, [INFO] [stdout] 428 + 0, [INFO] [stdout] 429 + 0, [INFO] [stdout] 430 + 0, [INFO] [stdout] 431 + 0, [INFO] [stdout] 432 + 0, [INFO] [stdout] 433 + 0, [INFO] [stdout] 434 + 0, [INFO] [stdout] 435 + ], [INFO] [stdout] 436 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | 0 as *mut libc::c_void [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/error.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | IoError(#[from] std::io::Error), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] = note: `#[warn(clippy::enum_variant_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:488:5 [INFO] [stdout] | [INFO] [stdout] 488 | return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 488 - return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] 488 + if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/error.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | VideoCoreError, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant name ends with the enum's name [INFO] [stdout] --> src/error.rs:16:5 [INFO] [stdout] | [INFO] [stdout] 16 | VideoCorePartialError, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#enum_variant_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:486:9 [INFO] [stdout] | [INFO] [stdout] 450 | / let mut init = VC_MSG { [INFO] [stdout] 451 | | len: 0, [INFO] [stdout] 452 | | req: 0, [INFO] [stdout] 453 | | tag: 0x3000e as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 484 | | ], [INFO] [stdout] 485 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 486 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 450 ~ [INFO] [stdout] 451 ~ VC_MSG { [INFO] [stdout] 452 + len: 0, [INFO] [stdout] 453 + req: 0, [INFO] [stdout] 454 + tag: 0x3000e as libc::c_int as uint32_t, [INFO] [stdout] 455 + blen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 456 + dlen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 457 + uints: [ [INFO] [stdout] 458 + h as uint32_t, [INFO] [stdout] 459 + 0, [INFO] [stdout] 460 + 0, [INFO] [stdout] 461 + 0, [INFO] [stdout] 462 + 0, [INFO] [stdout] 463 + 0, [INFO] [stdout] 464 + 0, [INFO] [stdout] 465 + 0, [INFO] [stdout] 466 + 0, [INFO] [stdout] 467 + 0, [INFO] [stdout] 468 + 0, [INFO] [stdout] 469 + 0, [INFO] [stdout] 470 + 0, [INFO] [stdout] 471 + 0, [INFO] [stdout] 472 + 0, [INFO] [stdout] 473 + 0, [INFO] [stdout] 474 + 0, [INFO] [stdout] 475 + 0, [INFO] [stdout] 476 + 0, [INFO] [stdout] 477 + 0, [INFO] [stdout] 478 + 0, [INFO] [stdout] 479 + 0, [INFO] [stdout] 480 + 0, [INFO] [stdout] 481 + 0, [INFO] [stdout] 482 + 0, [INFO] [stdout] 483 + 0, [INFO] [stdout] 484 + 0, [INFO] [stdout] 485 + ], [INFO] [stdout] 486 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:534:5 [INFO] [stdout] | [INFO] [stdout] 534 | return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 534 - return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] 534 + if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:532:9 [INFO] [stdout] | [INFO] [stdout] 496 | / let mut init = VC_MSG { [INFO] [stdout] 497 | | len: 0, [INFO] [stdout] 498 | | req: 0, [INFO] [stdout] 499 | | tag: 0x3000f as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 530 | | ], [INFO] [stdout] 531 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 532 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 496 ~ [INFO] [stdout] 497 ~ VC_MSG { [INFO] [stdout] 498 + len: 0, [INFO] [stdout] 499 + req: 0, [INFO] [stdout] 500 + tag: 0x3000f as libc::c_int as uint32_t, [INFO] [stdout] 501 + blen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 502 + dlen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 503 + uints: [ [INFO] [stdout] 504 + h as uint32_t, [INFO] [stdout] 505 + 0, [INFO] [stdout] 506 + 0, [INFO] [stdout] 507 + 0, [INFO] [stdout] 508 + 0, [INFO] [stdout] 509 + 0, [INFO] [stdout] 510 + 0, [INFO] [stdout] 511 + 0, [INFO] [stdout] 512 + 0, [INFO] [stdout] 513 + 0, [INFO] [stdout] 514 + 0, [INFO] [stdout] 515 + 0, [INFO] [stdout] 516 + 0, [INFO] [stdout] 517 + 0, [INFO] [stdout] 518 + 0, [INFO] [stdout] 519 + 0, [INFO] [stdout] 520 + 0, [INFO] [stdout] 521 + 0, [INFO] [stdout] 522 + 0, [INFO] [stdout] 523 + 0, [INFO] [stdout] 524 + 0, [INFO] [stdout] 525 + 0, [INFO] [stdout] 526 + 0, [INFO] [stdout] 527 + 0, [INFO] [stdout] 528 + 0, [INFO] [stdout] 529 + 0, [INFO] [stdout] 530 + 0, [INFO] [stdout] 531 + ], [INFO] [stdout] 532 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:624:5 [INFO] [stdout] | [INFO] [stdout] 624 | return 0 as libc::c_int as uint32_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 624 - return 0 as libc::c_int as uint32_t; [INFO] [stdout] 624 + 0 as libc::c_int as uint32_t [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:579:9 [INFO] [stdout] | [INFO] [stdout] 543 | / let mut init = VC_MSG { [INFO] [stdout] 544 | | len: 0, [INFO] [stdout] 545 | | req: 0, [INFO] [stdout] 546 | | tag: 0x38001 as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 577 | | ], [INFO] [stdout] 578 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 579 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 543 ~ [INFO] [stdout] 544 ~ VC_MSG { [INFO] [stdout] 545 + len: 0, [INFO] [stdout] 546 + req: 0, [INFO] [stdout] 547 + tag: 0x38001 as libc::c_int as uint32_t, [INFO] [stdout] 548 + blen: 8 as libc::c_int as uint32_t, [INFO] [stdout] 549 + dlen: 8 as libc::c_int as uint32_t, [INFO] [stdout] 550 + uints: [ [INFO] [stdout] 551 + id as uint32_t, [INFO] [stdout] 552 + 1 as libc::c_int as uint32_t, [INFO] [stdout] 553 + 0, [INFO] [stdout] 554 + 0, [INFO] [stdout] 555 + 0, [INFO] [stdout] 556 + 0, [INFO] [stdout] 557 + 0, [INFO] [stdout] 558 + 0, [INFO] [stdout] 559 + 0, [INFO] [stdout] 560 + 0, [INFO] [stdout] 561 + 0, [INFO] [stdout] 562 + 0, [INFO] [stdout] 563 + 0, [INFO] [stdout] 564 + 0, [INFO] [stdout] 565 + 0, [INFO] [stdout] 566 + 0, [INFO] [stdout] 567 + 0, [INFO] [stdout] 568 + 0, [INFO] [stdout] 569 + 0, [INFO] [stdout] 570 + 0, [INFO] [stdout] 571 + 0, [INFO] [stdout] 572 + 0, [INFO] [stdout] 573 + 0, [INFO] [stdout] 574 + 0, [INFO] [stdout] 575 + 0, [INFO] [stdout] 576 + 0, [INFO] [stdout] 577 + 0, [INFO] [stdout] 578 + ], [INFO] [stdout] 579 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:618:9 [INFO] [stdout] | [INFO] [stdout] 582 | / let mut init = VC_MSG { [INFO] [stdout] 583 | | len: 0, [INFO] [stdout] 584 | | req: 0, [INFO] [stdout] 585 | | tag: 0x38002 as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 616 | | ], [INFO] [stdout] 617 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 618 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 582 ~ [INFO] [stdout] 583 ~ VC_MSG { [INFO] [stdout] 584 + len: 0, [INFO] [stdout] 585 + req: 0, [INFO] [stdout] 586 + tag: 0x38002 as libc::c_int as uint32_t, [INFO] [stdout] 587 + blen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 588 + dlen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 589 + uints: [ [INFO] [stdout] 590 + id as uint32_t, [INFO] [stdout] 591 + freq, [INFO] [stdout] 592 + 0 as libc::c_int as uint32_t, [INFO] [stdout] 593 + 0, [INFO] [stdout] 594 + 0, [INFO] [stdout] 595 + 0, [INFO] [stdout] 596 + 0, [INFO] [stdout] 597 + 0, [INFO] [stdout] 598 + 0, [INFO] [stdout] 599 + 0, [INFO] [stdout] 600 + 0, [INFO] [stdout] 601 + 0, [INFO] [stdout] 602 + 0, [INFO] [stdout] 603 + 0, [INFO] [stdout] 604 + 0, [INFO] [stdout] 605 + 0, [INFO] [stdout] 606 + 0, [INFO] [stdout] 607 + 0, [INFO] [stdout] 608 + 0, [INFO] [stdout] 609 + 0, [INFO] [stdout] 610 + 0, [INFO] [stdout] 611 + 0, [INFO] [stdout] 612 + 0, [INFO] [stdout] 613 + 0, [INFO] [stdout] 614 + 0, [INFO] [stdout] 615 + 0, [INFO] [stdout] 616 + 0, [INFO] [stdout] 617 + ], [INFO] [stdout] 618 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:93:10 [INFO] [stdout] | [INFO] [stdout] 93 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] = note: `#[warn(clippy::zero_ptr)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:94:11 [INFO] [stdout] | [INFO] [stdout] 94 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:686:5 [INFO] [stdout] | [INFO] [stdout] 686 | return mem; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 686 - return mem; [INFO] [stdout] 686 + mem [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:655:38 [INFO] [stdout] | [INFO] [stdout] 655 | let mut mem: *mut libc::c_void = 0 as *mut libc::c_void; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:672:9 [INFO] [stdout] | [INFO] [stdout] 672 | 0 as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:707:9 [INFO] [stdout] | [INFO] [stdout] 707 | let ref mut fresh1 = *((dma_regs.virt as uint32_t) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 707 ~ let fresh1 = &mut *((dma_regs.virt as uint32_t) [INFO] [stdout] 708 + .wrapping_add(0xff0 as libc::c_int as uint32_t) as *mut uint32_t); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:95:11 [INFO] [stdout] | [INFO] [stdout] 95 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:102:10 [INFO] [stdout] | [INFO] [stdout] 102 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:103:11 [INFO] [stdout] | [INFO] [stdout] 103 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:104:11 [INFO] [stdout] | [INFO] [stdout] 104 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:111:10 [INFO] [stdout] | [INFO] [stdout] 111 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:112:11 [INFO] [stdout] | [INFO] [stdout] 112 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:782:5 [INFO] [stdout] | [INFO] [stdout] 782 | / return *((dma_regs.virt as uint32_t) [INFO] [stdout] 783 | | .wrapping_add( [INFO] [stdout] 784 | | (if 0x14 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 785 | | 0xff0 as libc::c_int [INFO] [stdout] ... | [INFO] [stdout] 788 | | }) as uint32_t, [INFO] [stdout] 789 | | ) as *mut uint32_t); [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 782 ~ *((dma_regs.virt as uint32_t) [INFO] [stdout] 783 + .wrapping_add( [INFO] [stdout] 784 + (if 0x14 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 785 + 0xff0 as libc::c_int [INFO] [stdout] 786 + } else { [INFO] [stdout] 787 + chan * 0x100 as libc::c_int + 0x14 as libc::c_int [INFO] [stdout] 788 + }) as uint32_t, [INFO] [stdout] 789 ~ ) as *mut uint32_t) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:793:5 [INFO] [stdout] | [INFO] [stdout] 793 | / return *((dma_regs.virt as uint32_t) [INFO] [stdout] 794 | | .wrapping_add( [INFO] [stdout] 795 | | (if 0 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 796 | | 0xff0 as libc::c_int [INFO] [stdout] ... | [INFO] [stdout] 799 | | }) as uint32_t, [INFO] [stdout] 800 | | ) as *mut uint32_t) & 1 as libc::c_int as uint32_t; [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 793 ~ *((dma_regs.virt as uint32_t) [INFO] [stdout] 794 + .wrapping_add( [INFO] [stdout] 795 + (if 0 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 796 + 0xff0 as libc::c_int [INFO] [stdout] 797 + } else { [INFO] [stdout] 798 + chan * 0x100 as libc::c_int + 0 as libc::c_int [INFO] [stdout] 799 + }) as uint32_t, [INFO] [stdout] 800 ~ ) as *mut uint32_t) & 1 as libc::c_int as uint32_t [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:831:9 [INFO] [stdout] | [INFO] [stdout] 831 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:113:11 [INFO] [stdout] | [INFO] [stdout] 113 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:120:10 [INFO] [stdout] | [INFO] [stdout] 120 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:121:11 [INFO] [stdout] | [INFO] [stdout] 121 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:122:11 [INFO] [stdout] | [INFO] [stdout] 122 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | return (*mp).virt; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 142 - return (*mp).virt; [INFO] [stdout] 142 + (*mp).virt [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:188:5 [INFO] [stdout] | [INFO] [stdout] 188 | return ret; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 188 - return ret; [INFO] [stdout] 188 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:149:38 [INFO] [stdout] | [INFO] [stdout] 149 | let mut ret: *mut libc::c_void = 0 as *mut libc::c_void; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:180:9 [INFO] [stdout] | [INFO] [stdout] 180 | 0 as *mut libc::c_void [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:264:5 [INFO] [stdout] | [INFO] [stdout] 264 | return (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 264 - return (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t; [INFO] [stdout] 264 + (*reg >> pin % 32 as libc::c_int & 1 as libc::c_int as uint32_t) as uint8_t [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:292:5 [INFO] [stdout] | [INFO] [stdout] 292 | return fd; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 292 - return fd; [INFO] [stdout] 292 + fd [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:338:5 [INFO] [stdout] | [INFO] [stdout] 338 | return ret; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 338 - return ret; [INFO] [stdout] 338 + ret [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:392:5 [INFO] [stdout] | [INFO] [stdout] 392 | return msg_mbox(fd, &mut msg); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 392 - return msg_mbox(fd, &mut msg); [INFO] [stdout] 392 + msg_mbox(fd, &mut msg) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:390:9 [INFO] [stdout] | [INFO] [stdout] 347 | / let mut init = VC_MSG { [INFO] [stdout] 348 | | len: 0, [INFO] [stdout] 349 | | req: 0, [INFO] [stdout] 350 | | tag: 0x3000c as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 388 | | ], [INFO] [stdout] 389 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 390 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 347 ~ [INFO] [stdout] 348 ~ VC_MSG { [INFO] [stdout] 349 + len: 0, [INFO] [stdout] 350 + req: 0, [INFO] [stdout] 351 + tag: 0x3000c as libc::c_int as uint32_t, [INFO] [stdout] 352 + blen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 353 + dlen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 354 + uints: [ [INFO] [stdout] 355 + if size % 0x1000 as libc::c_int as uint32_t [INFO] [stdout] 356 + == 0 as libc::c_int as uint32_t [INFO] [stdout] 357 + { [INFO] [stdout] 358 + size [INFO] [stdout] 359 + } else { [INFO] [stdout] 360 + size.wrapping_add(0x1000 as libc::c_int as uint32_t) [INFO] [stdout] 361 + & !(0x1000 as libc::c_int - 1 as libc::c_int) as uint32_t [INFO] [stdout] 362 + }, [INFO] [stdout] 363 + 0x1000 as libc::c_int as uint32_t, [INFO] [stdout] 364 + flags as uint32_t, [INFO] [stdout] 365 + 0, [INFO] [stdout] 366 + 0, [INFO] [stdout] 367 + 0, [INFO] [stdout] 368 + 0, [INFO] [stdout] 369 + 0, [INFO] [stdout] 370 + 0, [INFO] [stdout] 371 + 0, [INFO] [stdout] 372 + 0, [INFO] [stdout] 373 + 0, [INFO] [stdout] 374 + 0, [INFO] [stdout] 375 + 0, [INFO] [stdout] 376 + 0, [INFO] [stdout] 377 + 0, [INFO] [stdout] 378 + 0, [INFO] [stdout] 379 + 0, [INFO] [stdout] 380 + 0, [INFO] [stdout] 381 + 0, [INFO] [stdout] 382 + 0, [INFO] [stdout] 383 + 0, [INFO] [stdout] 384 + 0, [INFO] [stdout] 385 + 0, [INFO] [stdout] 386 + 0, [INFO] [stdout] 387 + 0, [INFO] [stdout] 388 + 0, [INFO] [stdout] 389 + ], [INFO] [stdout] 390 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:438:5 [INFO] [stdout] | [INFO] [stdout] 438 | / return if h != 0 { [INFO] [stdout] 439 | | msg_mbox(fd, &mut msg) as *mut libc::c_void [INFO] [stdout] 440 | | } else { [INFO] [stdout] 441 | | 0 as *mut libc::c_void [INFO] [stdout] 442 | | }; [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 438 ~ if h != 0 { [INFO] [stdout] 439 + msg_mbox(fd, &mut msg) as *mut libc::c_void [INFO] [stdout] 440 + } else { [INFO] [stdout] 441 + 0 as *mut libc::c_void [INFO] [stdout] 442 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:436:9 [INFO] [stdout] | [INFO] [stdout] 400 | / let mut init = VC_MSG { [INFO] [stdout] 401 | | len: 0, [INFO] [stdout] 402 | | req: 0, [INFO] [stdout] 403 | | tag: 0x3000d as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 434 | | ], [INFO] [stdout] 435 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 436 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 400 ~ [INFO] [stdout] 401 ~ VC_MSG { [INFO] [stdout] 402 + len: 0, [INFO] [stdout] 403 + req: 0, [INFO] [stdout] 404 + tag: 0x3000d as libc::c_int as uint32_t, [INFO] [stdout] 405 + blen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 406 + dlen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 407 + uints: [ [INFO] [stdout] 408 + h as uint32_t, [INFO] [stdout] 409 + 0, [INFO] [stdout] 410 + 0, [INFO] [stdout] 411 + 0, [INFO] [stdout] 412 + 0, [INFO] [stdout] 413 + 0, [INFO] [stdout] 414 + 0, [INFO] [stdout] 415 + 0, [INFO] [stdout] 416 + 0, [INFO] [stdout] 417 + 0, [INFO] [stdout] 418 + 0, [INFO] [stdout] 419 + 0, [INFO] [stdout] 420 + 0, [INFO] [stdout] 421 + 0, [INFO] [stdout] 422 + 0, [INFO] [stdout] 423 + 0, [INFO] [stdout] 424 + 0, [INFO] [stdout] 425 + 0, [INFO] [stdout] 426 + 0, [INFO] [stdout] 427 + 0, [INFO] [stdout] 428 + 0, [INFO] [stdout] 429 + 0, [INFO] [stdout] 430 + 0, [INFO] [stdout] 431 + 0, [INFO] [stdout] 432 + 0, [INFO] [stdout] 433 + 0, [INFO] [stdout] 434 + 0, [INFO] [stdout] 435 + ], [INFO] [stdout] 436 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:441:9 [INFO] [stdout] | [INFO] [stdout] 441 | 0 as *mut libc::c_void [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:488:5 [INFO] [stdout] | [INFO] [stdout] 488 | return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 488 - return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] 488 + if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:486:9 [INFO] [stdout] | [INFO] [stdout] 450 | / let mut init = VC_MSG { [INFO] [stdout] 451 | | len: 0, [INFO] [stdout] 452 | | req: 0, [INFO] [stdout] 453 | | tag: 0x3000e as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 484 | | ], [INFO] [stdout] 485 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 486 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 450 ~ [INFO] [stdout] 451 ~ VC_MSG { [INFO] [stdout] 452 + len: 0, [INFO] [stdout] 453 + req: 0, [INFO] [stdout] 454 + tag: 0x3000e as libc::c_int as uint32_t, [INFO] [stdout] 455 + blen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 456 + dlen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 457 + uints: [ [INFO] [stdout] 458 + h as uint32_t, [INFO] [stdout] 459 + 0, [INFO] [stdout] 460 + 0, [INFO] [stdout] 461 + 0, [INFO] [stdout] 462 + 0, [INFO] [stdout] 463 + 0, [INFO] [stdout] 464 + 0, [INFO] [stdout] 465 + 0, [INFO] [stdout] 466 + 0, [INFO] [stdout] 467 + 0, [INFO] [stdout] 468 + 0, [INFO] [stdout] 469 + 0, [INFO] [stdout] 470 + 0, [INFO] [stdout] 471 + 0, [INFO] [stdout] 472 + 0, [INFO] [stdout] 473 + 0, [INFO] [stdout] 474 + 0, [INFO] [stdout] 475 + 0, [INFO] [stdout] 476 + 0, [INFO] [stdout] 477 + 0, [INFO] [stdout] 478 + 0, [INFO] [stdout] 479 + 0, [INFO] [stdout] 480 + 0, [INFO] [stdout] 481 + 0, [INFO] [stdout] 482 + 0, [INFO] [stdout] 483 + 0, [INFO] [stdout] 484 + 0, [INFO] [stdout] 485 + ], [INFO] [stdout] 486 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:534:5 [INFO] [stdout] | [INFO] [stdout] 534 | return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 534 - return if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t }; [INFO] [stdout] 534 + if h != 0 { msg_mbox(fd, &mut msg) } else { 0 as libc::c_int as uint32_t } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:532:9 [INFO] [stdout] | [INFO] [stdout] 496 | / let mut init = VC_MSG { [INFO] [stdout] 497 | | len: 0, [INFO] [stdout] 498 | | req: 0, [INFO] [stdout] 499 | | tag: 0x3000f as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 530 | | ], [INFO] [stdout] 531 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 532 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 496 ~ [INFO] [stdout] 497 ~ VC_MSG { [INFO] [stdout] 498 + len: 0, [INFO] [stdout] 499 + req: 0, [INFO] [stdout] 500 + tag: 0x3000f as libc::c_int as uint32_t, [INFO] [stdout] 501 + blen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 502 + dlen: 4 as libc::c_int as uint32_t, [INFO] [stdout] 503 + uints: [ [INFO] [stdout] 504 + h as uint32_t, [INFO] [stdout] 505 + 0, [INFO] [stdout] 506 + 0, [INFO] [stdout] 507 + 0, [INFO] [stdout] 508 + 0, [INFO] [stdout] 509 + 0, [INFO] [stdout] 510 + 0, [INFO] [stdout] 511 + 0, [INFO] [stdout] 512 + 0, [INFO] [stdout] 513 + 0, [INFO] [stdout] 514 + 0, [INFO] [stdout] 515 + 0, [INFO] [stdout] 516 + 0, [INFO] [stdout] 517 + 0, [INFO] [stdout] 518 + 0, [INFO] [stdout] 519 + 0, [INFO] [stdout] 520 + 0, [INFO] [stdout] 521 + 0, [INFO] [stdout] 522 + 0, [INFO] [stdout] 523 + 0, [INFO] [stdout] 524 + 0, [INFO] [stdout] 525 + 0, [INFO] [stdout] 526 + 0, [INFO] [stdout] 527 + 0, [INFO] [stdout] 528 + 0, [INFO] [stdout] 529 + 0, [INFO] [stdout] 530 + 0, [INFO] [stdout] 531 + ], [INFO] [stdout] 532 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:624:5 [INFO] [stdout] | [INFO] [stdout] 624 | return 0 as libc::c_int as uint32_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 624 - return 0 as libc::c_int as uint32_t; [INFO] [stdout] 624 + 0 as libc::c_int as uint32_t [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:579:9 [INFO] [stdout] | [INFO] [stdout] 543 | / let mut init = VC_MSG { [INFO] [stdout] 544 | | len: 0, [INFO] [stdout] 545 | | req: 0, [INFO] [stdout] 546 | | tag: 0x38001 as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 577 | | ], [INFO] [stdout] 578 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 579 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 543 ~ [INFO] [stdout] 544 ~ VC_MSG { [INFO] [stdout] 545 + len: 0, [INFO] [stdout] 546 + req: 0, [INFO] [stdout] 547 + tag: 0x38001 as libc::c_int as uint32_t, [INFO] [stdout] 548 + blen: 8 as libc::c_int as uint32_t, [INFO] [stdout] 549 + dlen: 8 as libc::c_int as uint32_t, [INFO] [stdout] 550 + uints: [ [INFO] [stdout] 551 + id as uint32_t, [INFO] [stdout] 552 + 1 as libc::c_int as uint32_t, [INFO] [stdout] 553 + 0, [INFO] [stdout] 554 + 0, [INFO] [stdout] 555 + 0, [INFO] [stdout] 556 + 0, [INFO] [stdout] 557 + 0, [INFO] [stdout] 558 + 0, [INFO] [stdout] 559 + 0, [INFO] [stdout] 560 + 0, [INFO] [stdout] 561 + 0, [INFO] [stdout] 562 + 0, [INFO] [stdout] 563 + 0, [INFO] [stdout] 564 + 0, [INFO] [stdout] 565 + 0, [INFO] [stdout] 566 + 0, [INFO] [stdout] 567 + 0, [INFO] [stdout] 568 + 0, [INFO] [stdout] 569 + 0, [INFO] [stdout] 570 + 0, [INFO] [stdout] 571 + 0, [INFO] [stdout] 572 + 0, [INFO] [stdout] 573 + 0, [INFO] [stdout] 574 + 0, [INFO] [stdout] 575 + 0, [INFO] [stdout] 576 + 0, [INFO] [stdout] 577 + 0, [INFO] [stdout] 578 + ], [INFO] [stdout] 579 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:618:9 [INFO] [stdout] | [INFO] [stdout] 582 | / let mut init = VC_MSG { [INFO] [stdout] 583 | | len: 0, [INFO] [stdout] 584 | | req: 0, [INFO] [stdout] 585 | | tag: 0x38002 as libc::c_int as uint32_t, [INFO] [stdout] ... | [INFO] [stdout] 616 | | ], [INFO] [stdout] 617 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 618 | init [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 582 ~ [INFO] [stdout] 583 ~ VC_MSG { [INFO] [stdout] 584 + len: 0, [INFO] [stdout] 585 + req: 0, [INFO] [stdout] 586 + tag: 0x38002 as libc::c_int as uint32_t, [INFO] [stdout] 587 + blen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 588 + dlen: 12 as libc::c_int as uint32_t, [INFO] [stdout] 589 + uints: [ [INFO] [stdout] 590 + id as uint32_t, [INFO] [stdout] 591 + freq, [INFO] [stdout] 592 + 0 as libc::c_int as uint32_t, [INFO] [stdout] 593 + 0, [INFO] [stdout] 594 + 0, [INFO] [stdout] 595 + 0, [INFO] [stdout] 596 + 0, [INFO] [stdout] 597 + 0, [INFO] [stdout] 598 + 0, [INFO] [stdout] 599 + 0, [INFO] [stdout] 600 + 0, [INFO] [stdout] 601 + 0, [INFO] [stdout] 602 + 0, [INFO] [stdout] 603 + 0, [INFO] [stdout] 604 + 0, [INFO] [stdout] 605 + 0, [INFO] [stdout] 606 + 0, [INFO] [stdout] 607 + 0, [INFO] [stdout] 608 + 0, [INFO] [stdout] 609 + 0, [INFO] [stdout] 610 + 0, [INFO] [stdout] 611 + 0, [INFO] [stdout] 612 + 0, [INFO] [stdout] 613 + 0, [INFO] [stdout] 614 + 0, [INFO] [stdout] 615 + 0, [INFO] [stdout] 616 + 0, [INFO] [stdout] 617 + ], [INFO] [stdout] 618 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:686:5 [INFO] [stdout] | [INFO] [stdout] 686 | return mem; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 686 - return mem; [INFO] [stdout] 686 + mem [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:655:38 [INFO] [stdout] | [INFO] [stdout] 655 | let mut mem: *mut libc::c_void = 0 as *mut libc::c_void; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *mut _` detected [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:672:9 [INFO] [stdout] | [INFO] [stdout] 672 | 0 as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null_mut::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:707:9 [INFO] [stdout] | [INFO] [stdout] 707 | let ref mut fresh1 = *((dma_regs.virt as uint32_t) [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] = note: `#[warn(clippy::toplevel_ref_arg)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 707 ~ let fresh1 = &mut *((dma_regs.virt as uint32_t) [INFO] [stdout] 708 + .wrapping_add(0xff0 as libc::c_int as uint32_t) as *mut uint32_t); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:782:5 [INFO] [stdout] | [INFO] [stdout] 782 | / return *((dma_regs.virt as uint32_t) [INFO] [stdout] 783 | | .wrapping_add( [INFO] [stdout] 784 | | (if 0x14 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 785 | | 0xff0 as libc::c_int [INFO] [stdout] ... | [INFO] [stdout] 788 | | }) as uint32_t, [INFO] [stdout] 789 | | ) as *mut uint32_t); [INFO] [stdout] | |___________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 782 ~ *((dma_regs.virt as uint32_t) [INFO] [stdout] 783 + .wrapping_add( [INFO] [stdout] 784 + (if 0x14 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 785 + 0xff0 as libc::c_int [INFO] [stdout] 786 + } else { [INFO] [stdout] 787 + chan * 0x100 as libc::c_int + 0x14 as libc::c_int [INFO] [stdout] 788 + }) as uint32_t, [INFO] [stdout] 789 ~ ) as *mut uint32_t) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:793:5 [INFO] [stdout] | [INFO] [stdout] 793 | / return *((dma_regs.virt as uint32_t) [INFO] [stdout] 794 | | .wrapping_add( [INFO] [stdout] 795 | | (if 0 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 796 | | 0xff0 as libc::c_int [INFO] [stdout] ... | [INFO] [stdout] 799 | | }) as uint32_t, [INFO] [stdout] 800 | | ) as *mut uint32_t) & 1 as libc::c_int as uint32_t; [INFO] [stdout] | |__________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 793 ~ *((dma_regs.virt as uint32_t) [INFO] [stdout] 794 + .wrapping_add( [INFO] [stdout] 795 + (if 0 as libc::c_int == 0xff0 as libc::c_int { [INFO] [stdout] 796 + 0xff0 as libc::c_int [INFO] [stdout] 797 + } else { [INFO] [stdout] 798 + chan * 0x100 as libc::c_int + 0 as libc::c_int [INFO] [stdout] 799 + }) as uint32_t, [INFO] [stdout] 800 ~ ) as *mut uint32_t) & 1 as libc::c_int as uint32_t [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:831:9 [INFO] [stdout] | [INFO] [stdout] 831 | i = i + 1; [INFO] [stdout] | ^^^^^^^^^ help: replace it with: `i += 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:64:10 [INFO] [stdout] | [INFO] [stdout] 64 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 65 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:66:11 [INFO] [stdout] | [INFO] [stdout] 66 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:73:10 [INFO] [stdout] | [INFO] [stdout] 73 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:74:11 [INFO] [stdout] | [INFO] [stdout] 74 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:75:11 [INFO] [stdout] | [INFO] [stdout] 75 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:78:42 [INFO] [stdout] | [INFO] [stdout] 78 | pub static mut smi_cs: *mut SMI_CS_REG = 0 as *const SMI_CS_REG as *mut SMI_CS_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:80:40 [INFO] [stdout] | [INFO] [stdout] 80 | pub static mut smi_l: *mut SMI_L_REG = 0 as *const SMI_L_REG as *mut SMI_L_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:82:40 [INFO] [stdout] | [INFO] [stdout] 82 | pub static mut smi_a: *mut SMI_A_REG = 0 as *const SMI_A_REG as *mut SMI_A_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | pub static mut smi_d: *mut SMI_D_REG = 0 as *const SMI_D_REG as *mut SMI_D_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:86:44 [INFO] [stdout] | [INFO] [stdout] 86 | pub static mut smi_dmc: *mut SMI_DMC_REG = 0 as *const SMI_DMC_REG as *mut SMI_DMC_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:88:44 [INFO] [stdout] | [INFO] [stdout] 88 | pub static mut smi_dsr: *mut SMI_DSR_REG = 0 as *const SMI_DSR_REG as *mut SMI_DSR_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:90:44 [INFO] [stdout] | [INFO] [stdout] 90 | pub static mut smi_dsw: *mut SMI_DSW_REG = 0 as *const SMI_DSW_REG as *mut SMI_DSW_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:92:44 [INFO] [stdout] | [INFO] [stdout] 92 | pub static mut smi_dcs: *mut SMI_DCS_REG = 0 as *const SMI_DCS_REG as *mut SMI_DCS_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:94:44 [INFO] [stdout] | [INFO] [stdout] 94 | pub static mut smi_dca: *mut SMI_DCA_REG = 0 as *const SMI_DCA_REG as *mut SMI_DCA_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:96:44 [INFO] [stdout] | [INFO] [stdout] 96 | pub static mut smi_dcd: *mut SMI_DCD_REG = 0 as *const SMI_DCD_REG as *mut SMI_DCD_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:100:40 [INFO] [stdout] | [INFO] [stdout] 100 | pub static mut txdata: *mut uint16_t = 0 as *const uint16_t as *mut uint16_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:64:10 [INFO] [stdout] | [INFO] [stdout] 64 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:65:11 [INFO] [stdout] | [INFO] [stdout] 65 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:66:11 [INFO] [stdout] | [INFO] [stdout] 66 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:73:10 [INFO] [stdout] | [INFO] [stdout] 73 | bus: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:74:11 [INFO] [stdout] | [INFO] [stdout] 74 | virt: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:75:11 [INFO] [stdout] | [INFO] [stdout] 75 | phys: 0 as *const libc::c_void as *mut libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:78:42 [INFO] [stdout] | [INFO] [stdout] 78 | pub static mut smi_cs: *mut SMI_CS_REG = 0 as *const SMI_CS_REG as *mut SMI_CS_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/c2rust/smileds.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | txdata = cbs.offset(1 as isize) as *mut uint16_t; [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/c2rust/smileds.rs:294:12 [INFO] [stdout] | [INFO] [stdout] 294 | if !(fresh0 > 0 as c_int) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(fresh0 <= 0 as c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:80:40 [INFO] [stdout] | [INFO] [stdout] 80 | pub static mut smi_l: *mut SMI_L_REG = 0 as *const SMI_L_REG as *mut SMI_L_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:82:40 [INFO] [stdout] | [INFO] [stdout] 82 | pub static mut smi_a: *mut SMI_A_REG = 0 as *const SMI_A_REG as *mut SMI_A_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:84:40 [INFO] [stdout] | [INFO] [stdout] 84 | pub static mut smi_d: *mut SMI_D_REG = 0 as *const SMI_D_REG as *mut SMI_D_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:86:44 [INFO] [stdout] | [INFO] [stdout] 86 | pub static mut smi_dmc: *mut SMI_DMC_REG = 0 as *const SMI_DMC_REG as *mut SMI_DMC_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:88:44 [INFO] [stdout] | [INFO] [stdout] 88 | pub static mut smi_dsr: *mut SMI_DSR_REG = 0 as *const SMI_DSR_REG as *mut SMI_DSR_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:90:44 [INFO] [stdout] | [INFO] [stdout] 90 | pub static mut smi_dsw: *mut SMI_DSW_REG = 0 as *const SMI_DSW_REG as *mut SMI_DSW_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:92:44 [INFO] [stdout] | [INFO] [stdout] 92 | pub static mut smi_dcs: *mut SMI_DCS_REG = 0 as *const SMI_DCS_REG as *mut SMI_DCS_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:94:44 [INFO] [stdout] | [INFO] [stdout] 94 | pub static mut smi_dca: *mut SMI_DCA_REG = 0 as *const SMI_DCA_REG as *mut SMI_DCA_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:96:44 [INFO] [stdout] | [INFO] [stdout] 96 | pub static mut smi_dcd: *mut SMI_DCD_REG = 0 as *const SMI_DCD_REG as *mut SMI_DCD_REG; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:293:9 [INFO] [stdout] | [INFO] [stdout] 293 | len = len - 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `len -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0 as *const _` detected [INFO] [stdout] --> src/c2rust/smileds.rs:100:40 [INFO] [stdout] | [INFO] [stdout] 100 | pub static mut txdata: *mut uint16_t = 0 as *const uint16_t as *mut uint16_t; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::null::()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:326:15 [INFO] [stdout] | [INFO] [stdout] 326 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:336:21 [INFO] [stdout] | [INFO] [stdout] 336 | tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 336 - tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] 336 + tx_offset = tx_offset.add(BIT_NPULSES); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/smileds.rs:349:5 [INFO] [stdout] | [INFO] [stdout] 349 | return tx_buffer.as_mut_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 349 - return tx_buffer.as_mut_ptr(); [INFO] [stdout] 349 + tx_buffer.as_mut_ptr() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:386:46 [INFO] [stdout] | [INFO] [stdout] 386 | let mut tx_offset: *mut uint16_t = &mut *tx_buffer [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 387 | | .as_mut_ptr() [INFO] [stdout] 388 | | .offset(LED_TX_OFFSET!(pixel as usize) as isize); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/c2rust/smileds.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | let ref mut ptr = *tx_offset.offset(1); [INFO] [stdout] | ----^^^^^^^^^^^------------------------ help: try: `let ptr = &mut *tx_offset.offset(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:394:13 [INFO] [stdout] | [INFO] [stdout] 394 | *ptr = *ptr | channel_on_mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*ptr |= channel_on_mask` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | *ptr = *ptr & channel_off_mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*ptr &= channel_off_mask` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:399:21 [INFO] [stdout] | [INFO] [stdout] 399 | tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 399 - tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] 399 + tx_offset = tx_offset.add(BIT_NPULSES); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:400:9 [INFO] [stdout] | [INFO] [stdout] 400 | rgb_mask = rgb_mask >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rgb_mask >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:407:15 [INFO] [stdout] | [INFO] [stdout] 407 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:412:21 [INFO] [stdout] | [INFO] [stdout] 412 | tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 412 - tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] 412 + tx_offset = tx_offset.add(BIT_NPULSES); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/lib.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | unsafe fn to_c(&self) -> c2rust::smileds::color_t { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting integer literal to `isize` is unnecessary [INFO] [stdout] --> src/c2rust/smileds.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | txdata = cbs.offset(1 as isize) as *mut uint16_t; [INFO] [stdout] | ^^^^^^^^^^ help: try: `1_isize` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: path statement with no effect [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:278:9 [INFO] [stdout] | [INFO] [stdout] 278 | i; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(path_statements)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: path statement with no effect [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:645:9 [INFO] [stdout] | [INFO] [stdout] 645 | i; [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/c2rust/smileds.rs:294:12 [INFO] [stdout] | [INFO] [stdout] 294 | if !(fresh0 > 0 as c_int) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: try: `(fresh0 <= 0 as c_int)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:293:9 [INFO] [stdout] | [INFO] [stdout] 293 | len = len - 1; [INFO] [stdout] | ^^^^^^^^^^^^^ help: replace it with: `len -= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:109:16 [INFO] [stdout] | [INFO] [stdout] 109 | map_periph(&mut gpio_regs, GPIO_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 109 | map_periph(&raw mut gpio_regs, GPIO_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:110:16 [INFO] [stdout] | [INFO] [stdout] 110 | map_periph(&mut dma_regs, DMA_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 110 | map_periph(&raw mut dma_regs, DMA_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:111:16 [INFO] [stdout] | [INFO] [stdout] 111 | map_periph(&mut clk_regs, CLK_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 111 | map_periph(&raw mut clk_regs, CLK_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:112:16 [INFO] [stdout] | [INFO] [stdout] 112 | map_periph(&mut smi_regs, SMI_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 112 | map_periph(&raw mut smi_regs, SMI_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:131:22 [INFO] [stdout] | [INFO] [stdout] 131 | unmap_periph_mem(&mut vc_mem); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 131 | unmap_periph_mem(&raw mut vc_mem); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:326:15 [INFO] [stdout] | [INFO] [stdout] 326 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] = note: `#[warn(clippy::ptr_offset_with_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:132:22 [INFO] [stdout] | [INFO] [stdout] 132 | unmap_periph_mem(&mut smi_regs); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 132 | unmap_periph_mem(&raw mut smi_regs); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | unmap_periph_mem(&mut dma_regs); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 133 | unmap_periph_mem(&raw mut dma_regs); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:134:22 [INFO] [stdout] | [INFO] [stdout] 134 | unmap_periph_mem(&mut gpio_regs); [INFO] [stdout] | ^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 134 | unmap_periph_mem(&raw mut gpio_regs); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:321:22 [INFO] [stdout] | [INFO] [stdout] 321 | map_uncached_mem(&mut vc_mem, VC_MEM_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 321 | map_uncached_mem(&raw mut vc_mem, VC_MEM_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:336:21 [INFO] [stdout] | [INFO] [stdout] 336 | tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 336 - tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] 336 + tx_offset = tx_offset.add(BIT_NPULSES); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:322:19 [INFO] [stdout] | [INFO] [stdout] 322 | setup_smi_dma(&mut vc_mem, TX_BUFF_LEN!(led_count as usize) as c_int); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 322 | setup_smi_dma(&raw mut vc_mem, TX_BUFF_LEN!(led_count as usize) as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:326:15 [INFO] [stdout] | [INFO] [stdout] 326 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | led_count, [INFO] [stdout] | ^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:349:12 [INFO] [stdout] | [INFO] [stdout] 349 | return tx_buffer.as_mut_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:386:46 [INFO] [stdout] | [INFO] [stdout] 386 | let mut tx_offset: *mut uint16_t = &mut *tx_buffer [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 387 | | .as_mut_ptr() [INFO] [stdout] | |_____________________^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/c2rust/smileds.rs:349:5 [INFO] [stdout] | [INFO] [stdout] 349 | return tx_buffer.as_mut_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 349 - return tx_buffer.as_mut_ptr(); [INFO] [stdout] 349 + tx_buffer.as_mut_ptr() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:407:15 [INFO] [stdout] | [INFO] [stdout] 407 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:415:5 [INFO] [stdout] | [INFO] [stdout] 415 | color_buffer.fill([color_t { packed: 0 }; 512]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:427:9 [INFO] [stdout] | [INFO] [stdout] 427 | tx_buffer.as_mut_ptr() as *const libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:430:15 [INFO] [stdout] | [INFO] [stdout] 430 | start_smi(&mut vc_mem); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 430 | start_smi(&raw mut vc_mem); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:386:46 [INFO] [stdout] | [INFO] [stdout] 386 | let mut tx_offset: *mut uint16_t = &mut *tx_buffer [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 387 | | .as_mut_ptr() [INFO] [stdout] 388 | | .offset(LED_TX_OFFSET!(pixel as usize) as isize); [INFO] [stdout] | |________________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stdout] --> src/c2rust/smileds.rs:392:13 [INFO] [stdout] | [INFO] [stdout] 392 | let ref mut ptr = *tx_offset.offset(1); [INFO] [stdout] | ----^^^^^^^^^^^------------------------ help: try: `let ptr = &mut *tx_offset.offset(1);` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:394:13 [INFO] [stdout] | [INFO] [stdout] 394 | *ptr = *ptr | channel_on_mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*ptr |= channel_on_mask` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:396:13 [INFO] [stdout] | [INFO] [stdout] 396 | *ptr = *ptr & channel_off_mask; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*ptr &= channel_off_mask` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:399:21 [INFO] [stdout] | [INFO] [stdout] 399 | tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 399 - tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] 399 + tx_offset = tx_offset.add(BIT_NPULSES); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/c2rust/smileds.rs:400:9 [INFO] [stdout] | [INFO] [stdout] 400 | rgb_mask = rgb_mask >> 1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `rgb_mask >>= 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:407:15 [INFO] [stdout] | [INFO] [stdout] 407 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `offset` with a `usize` casted to an `isize` [INFO] [stdout] --> src/c2rust/smileds.rs:412:21 [INFO] [stdout] | [INFO] [stdout] 412 | tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_offset_with_cast [INFO] [stdout] help: use `add` instead [INFO] [stdout] | [INFO] [stdout] 412 - tx_offset = tx_offset.offset(BIT_NPULSES as isize); [INFO] [stdout] 412 + tx_offset = tx_offset.add(BIT_NPULSES); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/lib.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | unsafe fn to_c(&self) -> c2rust::smileds::color_t { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: path statement with no effect [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:278:9 [INFO] [stdout] | [INFO] [stdout] 278 | i; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(path_statements)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: path statement with no effect [INFO] [stdout] --> src/c2rust/rpi_dma_utils.rs:645:9 [INFO] [stdout] | [INFO] [stdout] 645 | i; [INFO] [stdout] | ^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:109:16 [INFO] [stdout] | [INFO] [stdout] 109 | map_periph(&mut gpio_regs, GPIO_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(static_mut_refs)]` (part of `#[warn(rust_2024_compatibility)]`) on by default [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 109 | map_periph(&raw mut gpio_regs, GPIO_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:110:16 [INFO] [stdout] | [INFO] [stdout] 110 | map_periph(&mut dma_regs, DMA_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 110 | map_periph(&raw mut dma_regs, DMA_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:111:16 [INFO] [stdout] | [INFO] [stdout] 111 | map_periph(&mut clk_regs, CLK_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 111 | map_periph(&raw mut clk_regs, CLK_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:112:16 [INFO] [stdout] | [INFO] [stdout] 112 | map_periph(&mut smi_regs, SMI_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 112 | map_periph(&raw mut smi_regs, SMI_BASE as *mut _, PAGE_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:131:22 [INFO] [stdout] | [INFO] [stdout] 131 | unmap_periph_mem(&mut vc_mem); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 131 | unmap_periph_mem(&raw mut vc_mem); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:132:22 [INFO] [stdout] | [INFO] [stdout] 132 | unmap_periph_mem(&mut smi_regs); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 132 | unmap_periph_mem(&raw mut smi_regs); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:133:22 [INFO] [stdout] | [INFO] [stdout] 133 | unmap_periph_mem(&mut dma_regs); [INFO] [stdout] | ^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 133 | unmap_periph_mem(&raw mut dma_regs); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:134:22 [INFO] [stdout] | [INFO] [stdout] 134 | unmap_periph_mem(&mut gpio_regs); [INFO] [stdout] | ^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 134 | unmap_periph_mem(&raw mut gpio_regs); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:321:22 [INFO] [stdout] | [INFO] [stdout] 321 | map_uncached_mem(&mut vc_mem, VC_MEM_SIZE as c_int); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 321 | map_uncached_mem(&raw mut vc_mem, VC_MEM_SIZE as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:322:19 [INFO] [stdout] | [INFO] [stdout] 322 | setup_smi_dma(&mut vc_mem, TX_BUFF_LEN!(led_count as usize) as c_int); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 322 | setup_smi_dma(&raw mut vc_mem, TX_BUFF_LEN!(led_count as usize) as c_int); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:326:15 [INFO] [stdout] | [INFO] [stdout] 326 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a shared reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:341:9 [INFO] [stdout] | [INFO] [stdout] 341 | led_count, [INFO] [stdout] | ^^^^^^^^^ shared reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: shared references to mutable statics are dangerous; it's undefined behavior if the static is mutated or if a mutable reference is created for it while the shared reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:349:12 [INFO] [stdout] | [INFO] [stdout] 349 | return tx_buffer.as_mut_ptr(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:386:46 [INFO] [stdout] | [INFO] [stdout] 386 | let mut tx_offset: *mut uint16_t = &mut *tx_buffer [INFO] [stdout] | ______________________________________________^ [INFO] [stdout] 387 | | .as_mut_ptr() [INFO] [stdout] | |_____________________^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:407:15 [INFO] [stdout] | [INFO] [stdout] 407 | &mut *tx_buffer.as_mut_ptr().offset(LED_TX_OFFSET!(0) as isize); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:415:5 [INFO] [stdout] | [INFO] [stdout] 415 | color_buffer.fill([color_t { packed: 0 }; 512]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:427:9 [INFO] [stdout] | [INFO] [stdout] 427 | tx_buffer.as_mut_ptr() as *const libc::c_void, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a mutable reference to mutable static [INFO] [stdout] --> src/c2rust/smileds.rs:430:15 [INFO] [stdout] | [INFO] [stdout] 430 | start_smi(&mut vc_mem); [INFO] [stdout] | ^^^^^^^^^^^ mutable reference to mutable static [INFO] [stdout] | [INFO] [stdout] = note: mutable references to mutable statics are dangerous; it's undefined behavior if any other pointer to the static is used or if any other reference is created for the static while the mutable reference lives [INFO] [stdout] = note: for more information, see [INFO] [stdout] help: use `&raw mut` instead to create a raw pointer [INFO] [stdout] | [INFO] [stdout] 430 | start_smi(&raw mut vc_mem); [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 22.46s [INFO] running `Command { std: "docker" "inspect" "4c106e08f4b0c41ad0a7e4259271d3f7b4fa406aaa7a217982321448129ebe49", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4c106e08f4b0c41ad0a7e4259271d3f7b4fa406aaa7a217982321448129ebe49", kill_on_drop: false }` [INFO] [stdout] 4c106e08f4b0c41ad0a7e4259271d3f7b4fa406aaa7a217982321448129ebe49