Welcome! Log In Create A New Profile


[nginx] Win32: disabled C4306 warnings with MSVC.

Sergey Kandaurov
September 07, 2022 08:38AM
details: https://hg.nginx.org/nginx/rev/b347fe705ff2
changeset: 8067:b347fe705ff2
user: Maxim Dounin <mdounin@mdounin.ru>
date: Wed Sep 07 00:47:07 2022 +0300
Win32: disabled C4306 warnings with MSVC.

Multiple C4306 warnings (conversion from 'type1' to 'type2' of greater size)
appear during 64-bit compilation with MSVC 2010 (and older) due to extensively
used constructs like "(void *) -1", so they were disabled.

In newer MSVC versions C4306 warnings were replaced with C4312 ones, and
these are not generated for such trivial type casts.


src/os/win32/ngx_win32_config.h | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff -r d1aa8cc3e387 -r b347fe705ff2 src/os/win32/ngx_win32_config.h
--- a/src/os/win32/ngx_win32_config.h Wed Sep 07 00:47:02 2022 +0300
+++ b/src/os/win32/ngx_win32_config.h Wed Sep 07 00:47:07 2022 +0300
@@ -104,6 +104,9 @@ typedef long time_t;
/* array is too small to include a terminating null character */
#pragma warning(disable:4295)

+/* conversion from 'type1' to 'type2' of greater size */
+#pragma warning(disable:4306)

nginx-devel mailing list -- nginx-devel@nginx.org
To unsubscribe send an email to nginx-devel-leave@nginx.org
Subject Author Views Posted

[nginx] Win32: disabled C4306 warnings with MSVC.

Sergey Kandaurov 455 September 07, 2022 08:38AM

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

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready