1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

uucore/mode: add cast for some platforms

This commit is contained in:
Michael Debertol 2021-08-17 15:42:50 +02:00
parent 5825889931
commit 38afdd6ab4
2 changed files with 3 additions and 3 deletions

View file

@ -326,8 +326,8 @@ impl Chmoder {
show_error!( show_error!(
"{}: new permissions are {}, not {}", "{}: new permissions are {}, not {}",
file.display(), file.display(),
display_permissions_unix(new_mode, false), display_permissions_unix(new_mode as mode_t, false),
display_permissions_unix(naively_expected_new_mode, false) display_permissions_unix(naively_expected_new_mode as mode_t, false)
); );
return Err(1); return Err(1);
} }

View file

@ -143,7 +143,7 @@ pub fn parse_mode(mode: &str) -> Result<mode_t, String> {
pub fn get_umask() -> u32 { pub fn get_umask() -> u32 {
let mask = unsafe { umask(0) }; let mask = unsafe { umask(0) };
unsafe { umask(mask) }; unsafe { umask(mask) };
mask mask as u32
} }
#[cfg(test)] #[cfg(test)]