uucore/mode: add cast for some platforms

This commit is contained in:
Michael Debertol
2021-08-25 13:52:09 +02:00
parent 5825889931
commit 38afdd6ab4
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -326,8 +326,8 @@ impl Chmoder {
show_error!(
"{}: new permissions are {}, not {}",
file.display(),
display_permissions_unix(new_mode, false),
display_permissions_unix(naively_expected_new_mode, false)
display_permissions_unix(new_mode as mode_t, false),
display_permissions_unix(naively_expected_new_mode as mode_t, false)
);
return Err(1);
}
+1 -1
View File
@@ -143,7 +143,7 @@ pub fn parse_mode(mode: &str) -> Result<mode_t, String> {
pub fn get_umask() -> u32 {
let mask = unsafe { umask(0) };
unsafe { umask(mask) };
mask
mask as u32
}
#[cfg(test)]