From: Sami Kerola Date: Sun, 3 Apr 2011 09:10:55 +0000 (+0200) Subject: setterm: fix variable types, and unused argument warnings X-Git-Tag: v2.20-rc1~379 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=172ba4f2a8fd4f075c709524a8f1ba7d87edf722;p=thirdparty%2Futil-linux.git setterm: fix variable types, and unused argument warnings Signed-off-by: Sami Kerola --- diff --git a/term-utils/setterm.c b/term-utils/setterm.c index f9e7a755ac..dbe3995ed3 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; }