svn commit: trunk/busybox: miscutils networking networking/udhcp

vda at busybox.net vda at busybox.net
Mon May 12 14:35:56 UTC 2008


Author: vda
Date: 2008-05-12 07:35:56 -0700 (Mon, 12 May 2008)
New Revision: 21973

Log:
-Wall fixes by Cristian Ionescu-Idbohrn. No object code changes.



Modified:
   trunk/busybox/miscutils/eject.c
   trunk/busybox/networking/nc_bloaty.c
   trunk/busybox/networking/udhcp/files.c


Changeset:
Modified: trunk/busybox/miscutils/eject.c
===================================================================
--- trunk/busybox/miscutils/eject.c	2008-05-12 12:43:57 UTC (rev 21972)
+++ trunk/busybox/miscutils/eject.c	2008-05-12 14:35:56 UTC (rev 21973)
@@ -57,7 +57,7 @@
 	io_hdr.timeout = 2000;
 
 	for (i = 0; i < 3; i++) {
-		io_hdr.cmdp = (char*)sg_commands[i];
+		io_hdr.cmdp = (void *)sg_commands[i];
 		ioctl_or_perror_and_die(dev_fd, SG_IO, (void *)&io_hdr, "%s", dev);
 	}
 

Modified: trunk/busybox/networking/nc_bloaty.c
===================================================================
--- trunk/busybox/networking/nc_bloaty.c	2008-05-12 12:43:57 UTC (rev 21972)
+++ trunk/busybox/networking/nc_bloaty.c	2008-05-12 14:35:56 UTC (rev 21973)
@@ -374,7 +374,7 @@
 	 thing to emerge after all the intervening crud.  Doesn't work for UDP on
 	 any machines I've tested, but feel free to surprise me. */
 		char optbuf[40];
-		int x = sizeof(optbuf);
+		socklen_t x = sizeof(optbuf);
 
 		rr = getsockopt(netfd, IPPROTO_IP, IP_OPTIONS, optbuf, &x);
 		if (rr < 0)
@@ -487,7 +487,7 @@
 			memset(&stage[11], ' ', 16*3);
 			x = bc;
 		}
-		sprintf(&stage[1], " %8.8x ", obc);  /* xxx: still slow? */
+		sprintf((char *)&stage[1], " %8.8x ", obc);  /* xxx: still slow? */
 		bc -= x;          /* fix current count */
 		obc += x;         /* fix current offset */
 		op = &stage[11];  /* where hex starts */
@@ -627,8 +627,8 @@
 		if (rnleft) {
 			rr = write(1, np, rnleft);
 			if (rr > 0) {
-				if (o_ofile)
-					oprint('<', np, rr);                /* log the stdout */
+				if (o_ofile) /* log the stdout */
+					oprint('<', (unsigned char *)np, rr);
 				np += rr;                        /* fix up ptrs and whatnot */
 				rnleft -= rr;                        /* will get sanity-checked above */
 				wrote_out += rr;                /* global count */
@@ -642,8 +642,8 @@
 				rr = rzleft;
 			rr = write(netfd, zp, rr);        /* one line, or the whole buffer */
 			if (rr > 0) {
-				if (o_ofile)
-					oprint('>', zp, rr);                /* log what got sent */
+				if (o_ofile) /* log what got sent */
+					oprint('>', (unsigned char *)zp, rr);
 				zp += rr;
 				rzleft -= rr;
 				wrote_net += rr;                /* global count */

Modified: trunk/busybox/networking/udhcp/files.c
===================================================================
--- trunk/busybox/networking/udhcp/files.c	2008-05-12 12:43:57 UTC (rev 21972)
+++ trunk/busybox/networking/udhcp/files.c	2008-05-12 14:35:56 UTC (rev 21973)
@@ -93,7 +93,7 @@
 #if ENABLE_FEATURE_RFC3397
 		if ((option->flags & TYPE_MASK) == OPTION_STR1035)
 			/* reuse buffer and length for RFC1035-formatted string */
-			buffer = dname_enc(NULL, 0, buffer, &length);
+			buffer = (char *)dname_enc(NULL, 0, buffer, &length);
 #endif
 
 		/* make a new option */
@@ -122,7 +122,7 @@
 #if ENABLE_FEATURE_RFC3397
 		if ((option->flags & TYPE_MASK) == OPTION_STR1035)
 			/* reuse buffer and length for RFC1035-formatted string */
-			buffer = dname_enc(existing->data + 2,
+			buffer = (char *)dname_enc(existing->data + 2,
 					existing->data[OPT_LEN], buffer, &length);
 #endif
 		if (existing->data[OPT_LEN] + length <= 255) {




More information about the busybox-cvs mailing list