aboutsummaryrefslogtreecommitdiff
path: root/src/tty.rs
diff options
context:
space:
mode:
authorJoe Wilm <joe@jwilm.com>2016-06-09 08:30:55 -0700
committerJoe Wilm <joe@jwilm.com>2016-06-09 08:30:55 -0700
commit8566e17860933ef1da36a88b5d3fd839352065b8 (patch)
treeb6c0dc4502b200a024f748b018b82116c9d588ac /src/tty.rs
parenta60dbd564b44161f92a26ae401cf9b3ce5add982 (diff)
downloadalacritty-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.rs21
1 files changed, 2 insertions, 19 deletions
diff --git a/src/tty.rs b/src/tty.rs
index 54a1a120..89975b43 100644
--- a/src/tty.rs
+++ b/src/tty.rs
@@ -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 {