[BUG] unable to use NGX_LOG_STDERR log level

Maxim Dounin mdounin at mdounin.ru
Wed Mar 24 04:11:52 MSK 2010


On Tue, Mar 23, 2010 at 11:29:07PM +0100, Manlio Perillo wrote:

> I have noted that I can not use NGX_LOG_STDERR log level.
> I get this compiler error message:


I believe it's unused on purpose (and it was never used in fact).  
If you want maximum possible logging level - use NGX_LOG_EMERG 

Probably it should be completely removed to avoid confusion.  
Corresponding string representation was already removed in 0.7.54.

> By the way, the `-W` option has been renamed in `-Wextra` in recent GCC
> versions

It doesn't mean that old versions magically disappear, and I 
believe Igor is still periodically tests nginx with gcc 2.95 
(which has no -Wextra).


> but the solution is probably to store the log level in a signed integer.

It's unsigned and I see no reason to introduce confusion here by 
artificially changing it to signed just to resolve compiler 

Additional reasons not to do it include: high bit is already 
used on 32bit platforms; it's hardly good idea to use signed 
integers with bitwise operators (despite the fact that only 
bitwise shift is really undefined).

Maxim Dounin

More information about the nginx-devel mailing list