[PATCH 2 of 3] Win32: disabled C4306 warnings with MSVC
Maxim Dounin
mdounin at mdounin.ru
Thu Sep 1 16:49:06 UTC 2022
# HG changeset patch
# User Maxim Dounin <mdounin at mdounin.ru>
# Date 1662050722 -10800
# Thu Sep 01 19:45:22 2022 +0300
# Node ID 63a4b5ffd440c526bc96c6879dc1b6b489975d98
# Parent 3d162f4c6f62b23d4906d2afaabcd8c2720fb12a
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.
diff -r 3d162f4c6f62 -r 63a4b5ffd440 src/os/win32/ngx_win32_config.h
--- a/src/os/win32/ngx_win32_config.h Thu Sep 01 19:45:02 2022 +0300
+++ b/src/os/win32/ngx_win32_config.h Thu Sep 01 19:45:22 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)
+
#endif
More information about the nginx-devel
mailing list