[PATCH 1/2] setterm: fix variable types, and unused argument warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Sami Kerola <kerolasa@xxxxxx>
---
 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 7ed25e6..3e9354e 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. */
@@ -1162,7 +1162,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);
@@ -1207,7 +1208,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;
 	}
-- 
1.7.4.2

--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux