Skip to content

Commit

Permalink
Resolve warning on Windows
Browse files Browse the repository at this point in the history
`cargo check --target=x86_64-pc-windows-msvc --features=debug`

    warning: function `display_ntstatus_error` is never used
       --> src/windows/process.rs:229:11
        |
    229 | unsafe fn display_ntstatus_error(ntstatus: windows::core::HRESULT) {
        |           ^^^^^^^^^^^^^^^^^^^^^^
        |
        = note: `#[warn(dead_code)]` on by default
  • Loading branch information
dtolnay committed Dec 7, 2024
1 parent 1bd4ba2 commit 9a089f5
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions src/windows/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,6 @@ fn windows_8_1_or_newer() -> &'static bool {
})
}

#[cfg(feature = "debug")]
unsafe fn display_ntstatus_error(ntstatus: windows::core::HRESULT) {
let code = ntstatus.0;
let message = ntstatus.message();
sysinfo_debug!(
"Couldn't get process infos: NtQuerySystemInformation returned {}: {}",
code,
message
);
}

unsafe fn get_exe(process_handler: &HandleWrapper) -> Option<PathBuf> {
let mut exe_buf = [0u16; MAX_PATH as usize + 1];
GetModuleFileNameExW(
Expand Down

0 comments on commit 9a089f5

Please sign in to comment.