solana-labs / rbpf

Rust virtual machine and JIT compiler for eBPF programs
Apache License 2.0
272 stars 163 forks source link

Warnings when compiling on macOS Arm #559

Closed ripatel-fd closed 4 months ago

ripatel-fd commented 4 months ago
rbpf % cargo +nightly clippy
    Checking solana_rbpf v0.8.0 (/Users/ripatel/opt/rbpf)
warning: function `get_system_page_size` is never used
  --> src/memory_management.rs:74:8
   |
74 | pub fn get_system_page_size() -> usize {
   |        ^^^^^^^^^^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: function `round_to_page_size` is never used
  --> src/memory_management.rs:87:8
   |
87 | pub fn round_to_page_size(value: usize, page_size: usize) -> usize {
   |        ^^^^^^^^^^^^^^^^^^

warning: function `allocate_pages` is never used
  --> src/memory_management.rs:96:15
   |
96 | pub unsafe fn allocate_pages(size_in_bytes: usize) -> Result<*mut u8, EbpfError> {
   |               ^^^^^^^^^^^^^^

warning: function `free_pages` is never used
   --> src/memory_management.rs:119:15
    |
119 | pub unsafe fn free_pages(raw: *mut u8, size_in_bytes: usize) -> Result<(), EbpfError> {
    |               ^^^^^^^^^^

warning: function `protect_pages` is never used
   --> src/memory_management.rs:132:15
    |
132 | pub unsafe fn protect_pages(
    |               ^^^^^^^^^^^^^

warning: `solana_rbpf` (lib) generated 5 warnings
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 2.58s