]> git.kaiwu.me - nginx.git/commitdiff
Win32: disabled C4306 warnings with MSVC.
authorMaxim Dounin <mdounin@mdounin.ru>
Tue, 6 Sep 2022 21:47:07 +0000 (00:47 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Tue, 6 Sep 2022 21:47:07 +0000 (00:47 +0300)
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

index dcd45fb25f7482f10d737f5e6cc5448b97ce97b8..406003a780413ca75e8931eecf55f88d60e16141 100644 (file)
@@ -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