Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 29953 invoked from network); 1 Dec 2010 03:16:30 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 1 Dec 2010 03:16:30 -0000 Received: (qmail 14121 invoked by uid 500); 1 Dec 2010 03:16:29 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 13821 invoked by uid 500); 1 Dec 2010 03:16:27 -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 13813 invoked by uid 99); 1 Dec 2010 03:16:26 -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 03:16:26 +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 [72.167.82.83] (HELO p3plsmtpa01-03.prod.phx3.secureserver.net) (72.167.82.83) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 01 Dec 2010 03:16:19 +0000 Received: (qmail 22429 invoked from network); 1 Dec 2010 03:15:57 -0000 Received: from unknown (76.252.112.72) by p3plsmtpa01-03.prod.phx3.secureserver.net (72.167.82.83) with ESMTP; 01 Dec 2010 03:15:57 -0000 Message-ID: <4CF5BDE4.9090603@rowe-clan.net> Date: Tue, 30 Nov 2010 21:15:48 -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: logging patch bug References: <4CB38729.7040404@rowe-clan.net> <201010122157.12486.sf@sfritsch.de> <4CB6289E.7090405@redfish-solutions.com> In-Reply-To: <4CB6289E.7090405@redfish-solutions.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 10/13/2010 4:46 PM, Philip Prindeville wrote: > On 10/12/10 12:57 PM, Stefan Fritsch wrote: >> On Monday 11 October 2010, William A. Rowe Jr. wrote: >>> Why were ap_errorlog_format_item->min_loglevel and >>> ap_errorlog_info->level declared with two different types? >> ap_errorlog_info->level is -1 if no log level is available, i.e. when >> logging per-request/per-conn info. However, ap_errorlog_format_item- >>> min_loglevel always contains a genuine loglevel (which is>=0). >> Therefore I have declared the former as signed int and the latter as >> unsigned int. >> >> But the comparison (item->min_loglevel> info->level) in log.c does >> cause a warning with -Wextra, even if it is correct. What do you >> suggest? Adding a cast or changing the declaration of min_loglevel to >> signed int? > > If they are only compared in one place, I'd use a cast. Least churn, and it means that > static analysis could still be used elsewhere to easily detect when out-of-range > assignments are made to the latter. In any case, this should be fixed before the tag, since it's been almost 2 mos here... .\server\log.c(1020) : warning C4018: '>' : signed/unsigned mismatch