diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua
index bf3d6c76..7c7bfefe 100644
--- a/src/actions/vstudio/vs2010_vcxproj.lua
+++ b/src/actions/vstudio/vs2010_vcxproj.lua
@@ -1154,13 +1154,13 @@
function vc2010.warningLevel(cfg)
- local w = 3
+ local w = "Level3"
if cfg.flags.NoWarnings then
- w = 0
+ w = "TurnOffAllWarnings"
elseif cfg.flags.ExtraWarnings then
- w = 4
+ w = "Level4"
end
- _p(3,'Level%d', w)
+ vc2010.element(3, "WarningLevel", nil, "%s", w)
end
diff --git a/tests/actions/vstudio/vc2010/test_compile_settings.lua b/tests/actions/vstudio/vc2010/test_compile_settings.lua
index 647ef4d0..62f19ee6 100644
--- a/tests/actions/vstudio/vc2010/test_compile_settings.lua
+++ b/tests/actions/vstudio/vc2010/test_compile_settings.lua
@@ -99,7 +99,7 @@
test.capture [[
NotUsing
- Level0
+ TurnOffAllWarnings
]]
end
@@ -113,7 +113,7 @@
test.capture [[
NotUsing
- Level0
+ TurnOffAllWarnings
]]
end