Date: Thu, 18 Oct 2007 09:54:58 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127688 for review Message-ID: <200710180954.l9I9swtS036145@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127688 Change 127688 by jb@jb_freebsd1 on 2007/10/18 09:54:39 Fix compiler warnings so that these pass WARNS. Affected files ... .. //depot/projects/dtrace/src/usr.sbin/IPXrouted/trace.c#4 edit .. //depot/projects/dtrace/src/usr.sbin/acpi/acpidump/acpi.c#5 edit .. //depot/projects/dtrace/src/usr.sbin/ppp/chap.h#4 edit .. //depot/projects/dtrace/src/usr.sbin/ppp/physical.h#4 edit .. //depot/projects/dtrace/src/usr.sbin/sa/db.c#2 edit Differences ... ==== //depot/projects/dtrace/src/usr.sbin/IPXrouted/trace.c#4 (text+ko) ==== @@ -363,8 +363,8 @@ fprintf(fd, "Bad cmd 0x%x %s %s#%x\n", ntohs(msg->rip_cmd), dir, ipxdp_ntoa(&who->sipx_addr), ntohs(who->sipx_addr.x_port)); - fprintf(fd, "size=%d cp=%lx packet=%x\n", size, - (u_long)cp, (u_int)packet); + fprintf(fd, "size=%d cp=%p packet=%p\n", size, + cp, packet); return; } switch (ntohs(msg->rip_cmd)) { @@ -407,8 +407,8 @@ fprintf(fd, "Bad cmd 0x%x %s %s#%x\n", ntohs(msg->sap_cmd), dir, ipxdp_ntoa(&who->sipx_addr), ntohs(who->sipx_addr.x_port)); - fprintf(fd, "size=%d cp=%lx packet=%x\n", size, - (u_long)cp, (u_int)packet); + fprintf(fd, "size=%d cp=%p packet=%p\n", size, + cp, packet); return; } switch (ntohs(msg->sap_cmd)) { ==== //depot/projects/dtrace/src/usr.sbin/acpi/acpidump/acpi.c#5 (text+ko) ==== @@ -821,7 +821,7 @@ close(STDOUT_FILENO); if (vflag == 0) close(STDERR_FILENO); - execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, 0); + execl("/usr/sbin/iasl", "iasl", "-d", tmpstr, NULL); err(1, "exec"); } ==== //depot/projects/dtrace/src/usr.sbin/ppp/chap.h#4 (text+ko) ==== @@ -61,7 +61,7 @@ #define descriptor2chap(d) \ ((d)->type == CHAP_DESCRIPTOR ? (struct chap *)(d) : NULL) #define auth2chap(a) \ - ((struct chap *)((char *)a - (int)&((struct chap *)0)->auth)) + ((struct chap *)((char *)a - (uintptr_t)&((struct chap *)0)->auth)) struct MSCHAPv2_resp { /* rfc2759 */ char PeerChallenge[16]; ==== //depot/projects/dtrace/src/usr.sbin/ppp/physical.h#4 (text+ko) ==== @@ -116,7 +116,7 @@ }; #define field2phys(fp, name) \ - ((struct physical *)((char *)fp - (int)(&((struct physical *)0)->name))) + ((struct physical *)((char *)fp - (uintptr_t)(&((struct physical *)0)->name))) #define link2physical(l) \ ((l)->type == PHYSICAL_LINK ? field2phys(l, link) : NULL) ==== //depot/projects/dtrace/src/usr.sbin/sa/db.c#2 (text+ko) ==== @@ -89,7 +89,7 @@ goto closeout; } else if (rv == 0) { /* It's there; verify version. */ if (data.size != sizeof(version)) { - warnx("invalid version size %d in %s", + warnx("invalid version size %zd in %s", data.size, uname); error = -1; goto closeout;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710180954.l9I9swtS036145>