Welcome! Log In Create A New Profile

Advanced

Re: [BUG] unable to use NGX_LOG_STDERR log level

Maxim Dounin
March 23, 2010 09:12PM
Hello!

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
instead.

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
warning.

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

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[BUG] unable to use NGX_LOG_STDERR log level

Manlio Perillo 2368 March 23, 2010 06:30PM

Re: [BUG] unable to use NGX_LOG_STDERR log level

Maxim Dounin 1109 March 23, 2010 09:12PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 90
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready