Date: Thu, 18 Oct 2007 09:58:02 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 127690 for review Message-ID: <200710180958.l9I9w27v036306@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127690 Change 127690 by jb@jb_freebsd1 on 2007/10/18 09:57:59 Fix compiler warnings to pass WARS. Affected files ... .. //depot/projects/dtrace/src/sbin/geom/class/virstor/geom_virstor.c#2 edit .. //depot/projects/dtrace/src/sbin/spppcontrol/spppcontrol.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sbin/geom/class/virstor/geom_virstor.c#2 (text+ko) ==== @@ -343,7 +343,7 @@ "%s: %s.", name, strerror(errno)); return; } - if (msize < MAX(md.md_chunk_size*4, map_size)) + if (msize < (off_t) MAX(md.md_chunk_size*4, map_size)) gctl_error(req, "Device %s is too small", name); error = g_metadata_clear(name, NULL); if (error != 0) { @@ -429,7 +429,7 @@ if (verbose) printf("(%u chunks) ", md.chunk_count); /* Check to make sure last sector is unused */ - if ((off_t)(md.chunk_count) * md.md_chunk_size > msize-ssize) + if ((off_t)(md.chunk_count * md.md_chunk_size) > msize-ssize) md.chunk_count--; md.chunk_next = 0; if (i != 1) { ==== //depot/projects/dtrace/src/sbin/spppcontrol/spppcontrol.c#4 (text+ko) ==== @@ -88,7 +88,7 @@ argc--; argv++; - spr.cmd = (int)SPPPIOGDEFS; + spr.cmd = (int)(uintptr_t) SPPPIOGDEFS; ifr.ifr_data = (caddr_t)&spr; if (ioctl(s, SIOCGIFGENERIC, &ifr) == -1) @@ -186,7 +186,7 @@ argc--; } - spr.cmd = (int)SPPPIOSDEFS; + spr.cmd = (int)(uintptr_t)SPPPIOSDEFS; if (ioctl(s, SIOCSIFGENERIC, &ifr) == -1) err(EX_OSERR, "SIOCSIFGENERIC(SPPPIOSDEFS)");
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710180958.l9I9w27v036306>