From owner-p4-projects@FreeBSD.ORG Thu Oct 18 09:58:03 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 4429D16A41A; Thu, 18 Oct 2007 09:58:03 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0A00616A418 for ; Thu, 18 Oct 2007 09:58:03 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id EF7E313C467 for ; Thu, 18 Oct 2007 09:58:02 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l9I9w2rb036309 for ; Thu, 18 Oct 2007 09:58:02 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l9I9w27v036306 for perforce@freebsd.org; Thu, 18 Oct 2007 09:58:02 GMT (envelope-from jb@freebsd.org) Date: Thu, 18 Oct 2007 09:58:02 GMT Message-Id: <200710180958.l9I9w27v036306@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 127690 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Oct 2007 09:58:03 -0000 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)");