httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Fritsch>
Subject Re: logging patch bug
Date Tue, 12 Oct 2010 19:57:12 GMT
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?

View raw message