svn commit: trunk/busybox: coreutils miscutils networking

vda at busybox.net vda at busybox.net
Fri May 9 11:07:16 PDT 2008


Author: vda
Date: 2008-05-09 11:07:15 -0700 (Fri, 09 May 2008)
New Revision: 21961

Log:
fix warnings about pointer signedness



Modified:
   trunk/busybox/coreutils/md5_sha1_sum.c
   trunk/busybox/coreutils/tr.c
   trunk/busybox/miscutils/less.c
   trunk/busybox/networking/arp.c
   trunk/busybox/networking/sendmail.c


Changeset:
Modified: trunk/busybox/coreutils/md5_sha1_sum.c
===================================================================
--- trunk/busybox/coreutils/md5_sha1_sum.c	2008-05-09 17:59:34 UTC (rev 21960)
+++ trunk/busybox/coreutils/md5_sha1_sum.c	2008-05-09 18:07:15 UTC (rev 21961)
@@ -21,7 +21,7 @@
 	/* xzalloc zero-terminates */
 	char *hex_value = xzalloc((hash_length * 2) + 1);
 	bin2hex(hex_value, (char*)hash_value, hash_length);
-	return hex_value;
+	return (unsigned char *)hex_value;
 }
 
 static uint8_t *hash_file(const char *filename, hash_algo_t hash_algo)

Modified: trunk/busybox/coreutils/tr.c
===================================================================
--- trunk/busybox/coreutils/tr.c	2008-05-09 17:59:34 UTC (rev 21960)
+++ trunk/busybox/coreutils/tr.c	2008-05-09 18:07:15 UTC (rev 21961)
@@ -208,8 +208,8 @@
 		if (*argv) {
 			if (argv[0][0] == '\0')
 				bb_error_msg_and_die("STRING2 cannot be empty");
-			output_length = expand(*argv, output);
-			map(vector, tr_buf, input_length, output, output_length);
+			output_length = expand(*argv, (char *)output);
+			map(vector, (unsigned char *)tr_buf, input_length, output, output_length);
 		}
 		for (i = 0; i < input_length; i++)
 			invec[(unsigned char)tr_buf[i]] = TRUE;

Modified: trunk/busybox/miscutils/less.c
===================================================================
--- trunk/busybox/miscutils/less.c	2008-05-09 17:59:34 UTC (rev 21960)
+++ trunk/busybox/miscutils/less.c	2008-05-09 18:07:15 UTC (rev 21961)
@@ -731,7 +731,7 @@
  again:
 	less_gets_pos = pos;
 	memset(input, 0, sizeof(input));
-	getch_nowait(input, sizeof(input));
+	getch_nowait((char *)input, sizeof(input));
 	less_gets_pos = -1;
 
 	/* Detect escape sequences (i.e. arrow keys) and handle

Modified: trunk/busybox/networking/arp.c
===================================================================
--- trunk/busybox/networking/arp.c	2008-05-09 17:59:34 UTC (rev 21960)
+++ trunk/busybox/networking/arp.c	2008-05-09 18:07:15 UTC (rev 21961)
@@ -200,7 +200,7 @@
 		}
 		bb_error_msg("device '%s' has HW address %s '%s'",
 					 ifname, xhw->name,
-					 xhw->print((char *) &ifr.ifr_hwaddr.sa_data));
+					 xhw->print((unsigned char *) &ifr.ifr_hwaddr.sa_data));
 	}
 }
 

Modified: trunk/busybox/networking/sendmail.c
===================================================================
--- trunk/busybox/networking/sendmail.c	2008-05-09 17:59:34 UTC (rev 21960)
+++ trunk/busybox/networking/sendmail.c	2008-05-09 18:07:15 UTC (rev 21961)
@@ -533,7 +533,7 @@
 			// so we reuse md5 space instead of xzalloc(16*2+1)
 #define md5_hex ((uint8_t *)&md5)
 //			uint8_t *md5_hex = (uint8_t *)&md5;
-			*bin2hex(md5_hex, s, 16) = '\0';
+			*bin2hex((char *)md5_hex, s, 16) = '\0';
 			// APOP
 			s = xasprintf("%s %s", opt_user, md5_hex);
 #undef md5_hex



More information about the busybox-cvs mailing list