diff options
author | Joe Wilm <joe@jwilm.com> | 2016-06-09 08:30:55 -0700 |
---|---|---|
committer | Joe Wilm <joe@jwilm.com> | 2016-06-09 08:30:55 -0700 |
commit | 8566e17860933ef1da36a88b5d3fd839352065b8 (patch) | |
tree | b6c0dc4502b200a024f748b018b82116c9d588ac /src/tty.rs | |
parent | a60dbd564b44161f92a26ae401cf9b3ce5add982 (diff) | |
download | alacritty-8566e17860933ef1da36a88b5d3fd839352065b8.tar.gz alacritty-8566e17860933ef1da36a88b5d3fd839352065b8.zip |
Fix all trivial compiler warnings
Of note are the `ansi` and `grid` modules becoming public. There are
several bits of unused code in each of these. In the case of `grid`, the
unused parts are generally useful, like some indexing implementations.
In ansi, there are pieces that will be used once the parser is more
complete. In any case, these modules are fairly generic and mostly
usable outside of Alacritty.
Unused cargo packages were also removed.
Diffstat (limited to 'src/tty.rs')
-rw-r--r-- | src/tty.rs | 21 |
1 files changed, 2 insertions, 19 deletions
@@ -7,7 +7,7 @@ use std::mem; use std::os::unix::io::FromRawFd; use std::ptr; -use libc::{self, winsize, c_int, c_char, pid_t, WNOHANG, WIFEXITED, WEXITSTATUS, SIGCHLD}; +use libc::{self, winsize, c_int, pid_t, WNOHANG, WIFEXITED, WEXITSTATUS, SIGCHLD}; /// Process ID of child process /// @@ -21,7 +21,7 @@ static mut PID: pid_t = 0; /// cheked via `process_should_exit`. static mut SHOULD_EXIT: bool = false; -extern "C" fn sigchld(a: c_int) { +extern "C" fn sigchld(_a: c_int) { let mut status: c_int = 0; unsafe { let p = libc::waitpid(PID, &mut status, WNOHANG); @@ -45,23 +45,6 @@ pub fn process_should_exit() -> bool { unsafe { SHOULD_EXIT } } -pub enum Error { - /// TODO - Unknown, -} - -impl Error { - /// Build an Error from the current value of errno. - fn from_errno() -> Error { - let err = errno(); - match err { - _ => Error::Unknown - } - } -} - -pub type Result<T> = ::std::result::Result<T, Error>; - /// Get the current value of errno fn errno() -> c_int { unsafe { |