Skip to content

Commit

Permalink
bzip2.rs: fix cast from mode_t`
Browse files Browse the repository at this point in the history
  • Loading branch information
Folkert de Vries authored and bjorn3 committed Nov 13, 2024
1 parent 67162c3 commit 1aaf5d8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bzip2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,8 @@ fn fopen_output_safely_rust(name: impl AsRef<Path>) -> *mut FILE {

opts.write(true).create_new(true);

opts.mode(libc::S_IWUSR | libc::S_IRUSR);
#[allow(clippy::unnecessary_cast)]
opts.mode((libc::S_IWUSR | libc::S_IRUSR) as u32);

let Ok(file) = opts.open(name) else {
return std::ptr::null_mut::<FILE>();
Expand Down

0 comments on commit 1aaf5d8

Please sign in to comment.