aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-05-12 14:35:56 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-05-12 14:35:56 +0000
commitc4f12f59cc907577d787f816b37122809f896bb2 (patch)
tree78b50dbcee80b14f79ce5d2ef12906ed4a40358a
parent023dc6798e05373bf33d64221bbe6a7265734c34 (diff)
downloadbusybox-w32-c4f12f59cc907577d787f816b37122809f896bb2.tar.gz
busybox-w32-c4f12f59cc907577d787f816b37122809f896bb2.tar.bz2
busybox-w32-c4f12f59cc907577d787f816b37122809f896bb2.zip
-Wall fixes by Cristian Ionescu-Idbohrn. No object code changes.
-rw-r--r--miscutils/eject.c2
-rw-r--r--networking/nc_bloaty.c12
-rw-r--r--networking/udhcp/files.c4
3 files changed, 9 insertions, 9 deletions
diff --git a/miscutils/eject.c b/miscutils/eject.c
index 42e071941..91cf98f5f 100644
--- a/miscutils/eject.c
+++ b/miscutils/eject.c
@@ -57,7 +57,7 @@ static void eject_scsi(const char *dev)
57 io_hdr.timeout = 2000; 57 io_hdr.timeout = 2000;
58 58
59 for (i = 0; i < 3; i++) { 59 for (i = 0; i < 3; i++) {
60 io_hdr.cmdp = (char*)sg_commands[i]; 60 io_hdr.cmdp = (void *)sg_commands[i];
61 ioctl_or_perror_and_die(dev_fd, SG_IO, (void *)&io_hdr, "%s", dev); 61 ioctl_or_perror_and_die(dev_fd, SG_IO, (void *)&io_hdr, "%s", dev);
62 } 62 }
63 63
diff --git a/networking/nc_bloaty.c b/networking/nc_bloaty.c
index dd94a1460..4ba726eb5 100644
--- a/networking/nc_bloaty.c
+++ b/networking/nc_bloaty.c
@@ -374,7 +374,7 @@ create new one, and bind() it. TODO */
374 thing to emerge after all the intervening crud. Doesn't work for UDP on 374 thing to emerge after all the intervening crud. Doesn't work for UDP on
375 any machines I've tested, but feel free to surprise me. */ 375 any machines I've tested, but feel free to surprise me. */
376 char optbuf[40]; 376 char optbuf[40];
377 int x = sizeof(optbuf); 377 socklen_t x = sizeof(optbuf);
378 378
379 rr = getsockopt(netfd, IPPROTO_IP, IP_OPTIONS, optbuf, &x); 379 rr = getsockopt(netfd, IPPROTO_IP, IP_OPTIONS, optbuf, &x);
380 if (rr < 0) 380 if (rr < 0)
@@ -487,7 +487,7 @@ static void oprint(int direction, unsigned char *p, unsigned bc)
487 memset(&stage[11], ' ', 16*3); 487 memset(&stage[11], ' ', 16*3);
488 x = bc; 488 x = bc;
489 } 489 }
490 sprintf(&stage[1], " %8.8x ", obc); /* xxx: still slow? */ 490 sprintf((char *)&stage[1], " %8.8x ", obc); /* xxx: still slow? */
491 bc -= x; /* fix current count */ 491 bc -= x; /* fix current count */
492 obc += x; /* fix current offset */ 492 obc += x; /* fix current offset */
493 op = &stage[11]; /* where hex starts */ 493 op = &stage[11]; /* where hex starts */
@@ -627,8 +627,8 @@ Debug("got %d from the net, errno %d", rr, errno);
627 if (rnleft) { 627 if (rnleft) {
628 rr = write(1, np, rnleft); 628 rr = write(1, np, rnleft);
629 if (rr > 0) { 629 if (rr > 0) {
630 if (o_ofile) 630 if (o_ofile) /* log the stdout */
631 oprint('<', np, rr); /* log the stdout */ 631 oprint('<', (unsigned char *)np, rr);
632 np += rr; /* fix up ptrs and whatnot */ 632 np += rr; /* fix up ptrs and whatnot */
633 rnleft -= rr; /* will get sanity-checked above */ 633 rnleft -= rr; /* will get sanity-checked above */
634 wrote_out += rr; /* global count */ 634 wrote_out += rr; /* global count */
@@ -642,8 +642,8 @@ Debug("wrote %d to stdout, errno %d", rr, errno);
642 rr = rzleft; 642 rr = rzleft;
643 rr = write(netfd, zp, rr); /* one line, or the whole buffer */ 643 rr = write(netfd, zp, rr); /* one line, or the whole buffer */
644 if (rr > 0) { 644 if (rr > 0) {
645 if (o_ofile) 645 if (o_ofile) /* log what got sent */
646 oprint('>', zp, rr); /* log what got sent */ 646 oprint('>', (unsigned char *)zp, rr);
647 zp += rr; 647 zp += rr;
648 rzleft -= rr; 648 rzleft -= rr;
649 wrote_net += rr; /* global count */ 649 wrote_net += rr; /* global count */
diff --git a/networking/udhcp/files.c b/networking/udhcp/files.c
index e0e8b12c3..b13367df7 100644
--- a/networking/udhcp/files.c
+++ b/networking/udhcp/files.c
@@ -93,7 +93,7 @@ static void attach_option(struct option_set **opt_list,
93#if ENABLE_FEATURE_RFC3397 93#if ENABLE_FEATURE_RFC3397
94 if ((option->flags & TYPE_MASK) == OPTION_STR1035) 94 if ((option->flags & TYPE_MASK) == OPTION_STR1035)
95 /* reuse buffer and length for RFC1035-formatted string */ 95 /* reuse buffer and length for RFC1035-formatted string */
96 buffer = dname_enc(NULL, 0, buffer, &length); 96 buffer = (char *)dname_enc(NULL, 0, buffer, &length);
97#endif 97#endif
98 98
99 /* make a new option */ 99 /* make a new option */
@@ -122,7 +122,7 @@ static void attach_option(struct option_set **opt_list,
122#if ENABLE_FEATURE_RFC3397 122#if ENABLE_FEATURE_RFC3397
123 if ((option->flags & TYPE_MASK) == OPTION_STR1035) 123 if ((option->flags & TYPE_MASK) == OPTION_STR1035)
124 /* reuse buffer and length for RFC1035-formatted string */ 124 /* reuse buffer and length for RFC1035-formatted string */
125 buffer = dname_enc(existing->data + 2, 125 buffer = (char *)dname_enc(existing->data + 2,
126 existing->data[OPT_LEN], buffer, &length); 126 existing->data[OPT_LEN], buffer, &length);
127#endif 127#endif
128 if (existing->data[OPT_LEN] + length <= 255) { 128 if (existing->data[OPT_LEN] + length <= 255) {