Skip to content

Commit

Permalink
Fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Sep 17, 2017
1 parent 8121632 commit 4a15b0e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions newlib/libc/sys/redox/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub const PATH_MAX: usize = 4096;

libc_fn!(unsafe access(path: *mut c_char, _amode: c_int) -> Result<c_int> {
// XXX amode
let fd = ::RawFile::open(::cstr_to_slice(path), O_CLOEXEC | O_STAT)?;
::RawFile::open(::cstr_to_slice(path), O_CLOEXEC | O_STAT)?;
Ok(0)
});

Expand Down Expand Up @@ -43,7 +43,7 @@ libc_fn!(unsafe _lseek(file: c_int, ptr: off_t, dir: c_int) -> Result<off_t> {

libc_fn!(unsafe mkdir(path: *mut c_char, mode: mode_t) -> Result<c_int> {
let flags = O_CREAT | O_EXCL | O_CLOEXEC | O_DIRECTORY | (mode as usize & 0o777);
let fd = ::RawFile::open(::cstr_to_slice(path), flags)?;
::RawFile::open(::cstr_to_slice(path), flags)?;
Ok(0)
});

Expand Down
6 changes: 3 additions & 3 deletions newlib/libc/sys/redox/src/unimpl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,19 @@ libc_fn!(unsafe vfork() -> c_int {
::process::_fork()
});

libc_fn!(ttyname(fd: c_int) -> Result<*const c_char> {
libc_fn!(ttyname(_fd: c_int) -> Result<*const c_char> {
UNIMPL!(ttyname, EINVAL)
});

libc_fn!(fpathconf(fildes: c_int, name: c_int) -> Result<c_long> {
libc_fn!(fpathconf(_fildes: c_int, _name: c_int) -> Result<c_long> {
UNIMPL!(fpathconf, EINVAL)
});

libc_fn!(getlogin() -> Result<*const c_char> {
UNIMPL!(getlogin, EINVAL)
});

libc_fn!(unsafe select(nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, _timeout: *mut timeval) -> Result<c_int> {
libc_fn!(unsafe select(_nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, _timeout: *mut timeval) -> Result<c_int> {
use ::types::{FD_SETSIZE, NFDBITS};
let mut ret = 0;
syscall::write(2, b"unimplemented: select()\n").unwrap();
Expand Down

0 comments on commit 4a15b0e

Please sign in to comment.