diff options
author | Tim Angus <tim@ngus.net> | 2011-10-27 21:32:28 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-10 23:38:31 +0000 |
commit | 43285fefafed6821fb277c71da7b28d5291d87dd (patch) | |
tree | 0226ebc695a8b5964f98385aa0ba842bf44065b4 /src/sys/con_tty.c | |
parent | 6fa292451d11608d1588f1b28569ccb2dd1cea57 (diff) |
* Fix various warnings with GCC and clang
Diffstat (limited to 'src/sys/con_tty.c')
-rw-r--r-- | src/sys/con_tty.c | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/sys/con_tty.c b/src/sys/con_tty.c index 20afab4c..0d8da734 100644 --- a/src/sys/con_tty.c +++ b/src/sys/con_tty.c @@ -90,13 +90,14 @@ send "\b \b" static void CON_Back( void ) { char key; + size_t UNUSED_VAR size; key = '\b'; - write(STDOUT_FILENO, &key, 1); + size = write(STDOUT_FILENO, &key, 1); key = ' '; - write(STDOUT_FILENO, &key, 1); + size = write(STDOUT_FILENO, &key, 1); key = '\b'; - write(STDOUT_FILENO, &key, 1); + size = write(STDOUT_FILENO, &key, 1); } /* @@ -147,12 +148,13 @@ static void CON_Show( void ) ttycon_hide--; if (ttycon_hide == 0) { - write(STDOUT_FILENO, "]", 1); + size_t UNUSED_VAR size; + size = write(STDOUT_FILENO, "]", 1); if (TTY_con.cursor) { for (i=0; i<TTY_con.cursor; i++) { - write(STDOUT_FILENO, TTY_con.buffer+i, 1); + size = write(STDOUT_FILENO, TTY_con.buffer+i, 1); } } } @@ -329,6 +331,7 @@ char *CON_Input( void ) int avail; char key; field_t *history; + size_t UNUSED_VAR size; if(ttycon_on) { @@ -358,8 +361,8 @@ char *CON_Input( void ) Q_strncpyz(text, TTY_con.buffer, sizeof(text)); Field_Clear(&TTY_con); key = '\n'; - write(STDOUT_FILENO, &key, 1); - write(STDOUT_FILENO, "]", 1); + size = write(STDOUT_FILENO, &key, 1); + size = write(STDOUT_FILENO, "]", 1); return text; } if (key == '\t') @@ -423,7 +426,7 @@ char *CON_Input( void ) TTY_con.buffer[TTY_con.cursor] = key; TTY_con.cursor++; // print the current line (this is differential) - write(STDOUT_FILENO, &key, 1); + size = write(STDOUT_FILENO, &key, 1); } return NULL; |