From 8566e17860933ef1da36a88b5d3fd839352065b8 Mon Sep 17 00:00:00 2001 From: Joe Wilm Date: Thu, 9 Jun 2016 08:30:55 -0700 Subject: 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. --- src/tty.rs | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/tty.rs') 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 = ::std::result::Result; - /// Get the current value of errno fn errno() -> c_int { unsafe { -- cgit v1.2.3-54-g00ecf