Skip to content
  • Nobuyoshi Nakada's avatar
    c690ca03
    Ignore return value of `into_raw_fd` · c690ca03
    Nobuyoshi Nakada authored
    Fix as the compiler orders:
    ```
    warning: unused return value of `into_raw_fd` that must be used
       --> ../src/yjit/src/disasm.rs:123:21
        |
    123 |                     file.into_raw_fd(); // keep the fd open
        |                     ^^^^^^^^^^^^^^^^^^
        |
        = note: losing the raw file descriptor may leak resources
        = note: `#[warn(unused_must_use)]` on by default
    help: use `let _ = ...` to ignore the resulting value
        |
    123 |                     let _ = file.into_raw_fd(); // keep the fd open
        |                     +++++++
    
    warning: unused return value of `into_raw_fd` that must be used
      --> ../src/yjit/src/log.rs:84:21
       |
    84 |                     file.into_raw_fd(); // keep the fd open
       |                     ^^^^^^^^^^^^^^^^^^
       |
       = note: losing the raw file descriptor may leak resources
    help: use `let _ = ...` to ignore the resulting value
       |
    84 |                     let _ = file.into_raw_fd(); // keep the fd open
       |                     +++++++
    ```
    c690ca03
    Ignore return value of `into_raw_fd`
    Nobuyoshi Nakada authored
    Fix as the compiler orders:
    ```
    warning: unused return value of `into_raw_fd` that must be used
       --> ../src/yjit/src/disasm.rs:123:21
        |
    123 |                     file.into_raw_fd(); // keep the fd open
        |                     ^^^^^^^^^^^^^^^^^^
        |
        = note: losing the raw file descriptor may leak resources
        = note: `#[warn(unused_must_use)]` on by default
    help: use `let _ = ...` to ignore the resulting value
        |
    123 |                     let _ = file.into_raw_fd(); // keep the fd open
        |                     +++++++
    
    warning: unused return value of `into_raw_fd` that must be used
      --> ../src/yjit/src/log.rs:84:21
       |
    84 |                     file.into_raw_fd(); // keep the fd open
       |                     ^^^^^^^^^^^^^^^^^^
       |
       = note: losing the raw file descriptor may leak resources
    help: use `let _ = ...` to ignore the resulting value
       |
    84 |                     let _ = file.into_raw_fd(); // keep the fd open
       |                     +++++++
    ```
Loading