PERFORCE change 127690 for review
John Birrell
jb at FreeBSD.org
Thu Oct 18 02:58:03 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=127690
Change 127690 by jb at 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)");
More information about the p4-projects
mailing list