Fix type warning on Windows.

Add cast since read / write has unsigned return type on windows.
This commit is contained in:
Qi Wang
2018-04-06 11:40:44 -07:00
committed by Qi Wang
parent 4df483f0fd
commit d3e0976a2c
5 changed files with 44 additions and 31 deletions

View File

@@ -67,7 +67,7 @@ token_error(token_t *token) {
token->col);
break;
}
UNUSED ssize_t err = write(STDERR_FILENO,
UNUSED ssize_t err = malloc_write_fd(STDERR_FILENO,
&token->parser->buf[token->pos], token->len);
malloc_printf("\n");
}