diff options
author | Sami Kerola | 2011-04-03 11:10:55 +0200 |
---|---|---|
committer | Karel Zak | 2011-04-06 11:21:48 +0200 |
commit | 172ba4f2a8fd4f075c709524a8f1ba7d87edf722 (patch) | |
tree | 6e6373abb35461241669b2ebe761631940df5f91 | |
parent | setterm: add note about long dump file paths to man page (diff) | |
download | kernel-qcow2-util-linux-172ba4f2a8fd4f075c709524a8f1ba7d87edf722.tar.gz kernel-qcow2-util-linux-172ba4f2a8fd4f075c709524a8f1ba7d87edf722.tar.xz kernel-qcow2-util-linux-172ba4f2a8fd4f075c709524a8f1ba7d87edf722.zip |
setterm: fix variable types, and unused argument warnings
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
-rw-r--r-- | term-utils/setterm.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/term-utils/setterm.c b/term-utils/setterm.c index f9e7a755a..dbe3995ed 100644 --- a/term-utils/setterm.c +++ b/term-utils/setterm.c @@ -234,7 +234,7 @@ parse_term(int argc, char **argv, int *option, char **opt_term, int *bad_arg) { } static void -parse_none(int argc, char **argv, int *option, int *bad_arg) { +parse_none(int argc, char **argv __attribute__ ((__unused__)), int *option, int *bad_arg) { /* argc: Number of arguments for this option. */ /* argv: Arguments for this option. */ /* option: Term flag to set. */ @@ -1156,7 +1156,8 @@ screendump(int vcnum, FILE * F) char infile[MAXPATHLEN]; unsigned char header[4]; unsigned int rows, cols; - int fd, i, j; + int fd; + size_t i, j; char *inbuf, *outbuf, *p, *q; sprintf(infile, "/dev/vcsa%d", vcnum); @@ -1201,7 +1202,7 @@ screendump(int vcnum, FILE * F) q--; *q++ = '\n'; } - if (fwrite(outbuf, 1, q - outbuf, F) != q - outbuf) { + if (fwrite(outbuf, 1, q - outbuf, F) != (size_t) (q - outbuf)) { warnx(_("Error writing screendump")); goto error; } |