Skip to content

Commit 4a15b0e

Browse files
committed
Fix warnings
1 parent 8121632 commit 4a15b0e

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

newlib/libc/sys/redox/src/file.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub const PATH_MAX: usize = 4096;
88

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

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

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

newlib/libc/sys/redox/src/unimpl.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -58,19 +58,19 @@ libc_fn!(unsafe vfork() -> c_int {
5858
::process::_fork()
5959
});
6060

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

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

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

73-
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> {
73+
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> {
7474
use ::types::{FD_SETSIZE, NFDBITS};
7575
let mut ret = 0;
7676
syscall::write(2, b"unimplemented: select()\n").unwrap();

0 commit comments

Comments
 (0)