From 924b205539a36c9524f03130d09d527388d38a03 Mon Sep 17 00:00:00 2001 From: Patrick Mackinlay Date: Fri, 3 Jan 2025 16:03:35 +0700 Subject: build: adjust msvc warning settings --- scripts/genie.lua | 8 ++++---- scripts/src/3rdparty.lua | 3 +++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/genie.lua b/scripts/genie.lua index 481ceb1d4a0..76ffc77a6e2 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -1300,8 +1300,6 @@ configuration { "vs20*" } } buildoptions { - "/wd4003", -- warning C4003: not enough actual parameters for macro 'xxx' - "/wd4005", -- warning C4005: The macro identifier is defined twice. The compiler uses the second macro definition "/wd4018", -- warning C4018: 'x' : signed/unsigned mismatch "/wd4060", -- warning C4060: switch statement contains no 'case' or 'default' labels "/wd4065", -- warning C4065: switch statement contains 'default' but no 'case' labels @@ -1313,6 +1311,7 @@ configuration { "vs20*" } "/wd4245", -- warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch "/wd4250", -- warning C4250: 'xxx' : inherits 'xxx' via dominance "/wd4267", -- warning C4267: 'var' : conversion from 'size_t' to 'type', possible loss of data + "/wd4305", -- warning C4305: 'conversion': truncation from 'type1' to 'type2' "/wd4310", -- warning C4310: cast truncates constant value "/wd4319", -- warning C4319: 'operator' : zero extending 'type' to 'type' of greater size "/wd4324", -- warning C4324: 'xxx' : structure was padded due to __declspec(align()) @@ -1323,10 +1322,11 @@ configuration { "vs20*" } "/wd4458", -- warning C4458: declaration of 'xxx' hides class member "/wd4459", -- warning C4459: declaration of 'xxx' hides global declaration "/wd4611", -- warning C4611: interaction between '_setjmp' and C++ object destruction is non-portable + "/wd4646", -- warning C4646: function declared with 'noreturn' has non-void return type + "/wd4701", -- warning C4701: potentially uninitialized local variable 'name' used "/wd4702", -- warning C4702: unreachable code - "/wd4706", -- warning C4706: assignment within conditional expression - "/wd4804", -- warning C4804: '>>': unsafe use of type 'bool' in operation "/wd4805", -- warning C4805: 'x' : unsafe mix of type 'xxx' and type 'xxx' in operation + "/wd4806", -- warning C4806: 'operation': unsafe operation: no value of type 'type' promoted to type 'type' can equal the given constant "/wd4996", -- warning C4996: 'function': was declared deprecated } diff --git a/scripts/src/3rdparty.lua b/scripts/src/3rdparty.lua index 14e7ca21b09..29ea1676d0b 100755 --- a/scripts/src/3rdparty.lua +++ b/scripts/src/3rdparty.lua @@ -720,6 +720,7 @@ project "flac" configuration { "vs*" } buildoptions { + "/wd4057", -- warning C4057: 'operator': 'identifier1' differs in indirection to slightly different base types from 'identifier2' "/wd4127", -- warning C4127: conditional expression is constant "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4100", -- warning C4100: 'xxx' : unreferenced formal parameter @@ -969,6 +970,7 @@ project "lua" configuration { "vs*" } buildoptions { + "/wd4101", -- warning C4101: 'identifier': unreferenced local variable "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4702", -- warning C4702: unreachable code "/wd4310", -- warning C4310: cast truncates constant value @@ -1060,6 +1062,7 @@ project "lualibs" configuration { "vs*" } buildoptions { + "/wd4101", -- warning C4101: 'identifier': unreferenced local variable "/wd4244", -- warning C4244: 'argument' : conversion from 'xxx' to 'xxx', possible loss of data "/wd4055", -- warning C4055: 'type cast': from data pointer 'void *' to function pointer 'xxx' "/wd4152", -- warning C4152: nonstandard extension, function/data pointer conversion in expression -- cgit v1.2.3