Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 7129 invoked from network); 1 Dec 2010 02:24:49 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 02:24:49 -0000 Received: (qmail 68692 invoked by uid 500); 1 Dec 2010 02:24:48 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 68609 invoked by uid 500); 1 Dec 2010 02:24:47 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 68591 invoked by uid 99); 1 Dec 2010 02:24:47 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Dec 2010 02:24:47 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [64.202.165.38] (HELO smtpauth21.prod.mesa1.secureserver.net) (64.202.165.38) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Dec 2010 02:24:39 +0000 Received: (qmail 10728 invoked from network); 1 Dec 2010 02:24:18 -0000 Received: from unknown (76.252.112.72) by smtpauth21.prod.mesa1.secureserver.net (64.202.165.38) with ESMTP; 01 Dec 2010 02:24:18 -0000 Message-ID: <4CF5B1C9.8070005@rowe-clan.net> Date: Tue, 30 Nov 2010 20:24:09 -0600 From: "William A. Rowe Jr." User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101027 Lightning/1.0b2 Thunderbird/3.1.6 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: svn commit: r1040791 - /httpd/httpd/trunk/support/htcacheclean.c References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/30/2010 3:59 PM, fuankg@apache.org wrote: > Author: fuankg > Date: Tue Nov 30 21:59:01 2010 > New Revision: 1040791 > > URL: http://svn.apache.org/viewvc?rev=1040791&view=rev > Log: > Some more casts to make MSVC calm ... > > Modified: > httpd/httpd/trunk/support/htcacheclean.c > > Modified: httpd/httpd/trunk/support/htcacheclean.c > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/support/htcacheclean.c?rev=1040791&r1=1040790&r2=1040791&view=diff > ============================================================================== > --- httpd/httpd/trunk/support/htcacheclean.c (original) > +++ httpd/httpd/trunk/support/htcacheclean.c Tue Nov 30 21:59:01 2010 > @@ -508,9 +508,9 @@ static int list_urls(char *path, apr_poo > " %" APR_TIME_T_FMT > " %d %d\n", > url, > - round_up(hinfo.size, round), > + round_up((apr_size_t)hinfo.size, round), Absolutely not. apr_off_t is nearly always much smaller than apr_size_t. Conveniently, there is an APR_OFF_T_FMT at your service to solve this correctly. The vast majority of casts are used inappropriately. Appropriate casts should be documented, and you will rarely find one that can't be better addressed by correct normalization of all of the types/function declarations involved. Since we are no where near API freeze, there are basically no excuses.