Skip to content

Commit

Permalink
disable 26444 warning for prefast (#327)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlee671 authored Jan 8, 2025
1 parent 1dddd49 commit 296d6eb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions test/vswhere.test/GlobTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,10 @@ TEST_CLASS(GlobTests)
{
try
{
#pragma warning(push)
#pragma warning(disable:26444) // Ignore warning C26444: Don't try to declare a local variable with no name since it is intended for below lambda
Glob(L"C:\\ShouldNotExist", L"**msbuild.exe");
#pragma warning(pop)
}
catch (const win32_error& ex)
{
Expand Down
4 changes: 3 additions & 1 deletion test/vswhere.test/InstanceSelectorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ TEST_CLASS(InstanceSelectorTests)
args.Parse(L"vswhere.exe -version invalid");

TestHelper helper(0, 0);

#pragma warning(push)
#pragma warning(disable:26444) // Ignore warning C26444: Don't try to declare a local variable with no name since it is intended for below lambda
Assert::ExpectException<win32_error>([&] { InstanceSelector(args, &helper); });
#pragma warning(pop)
}

TEST_METHOD(Less_No_Version_A)
Expand Down

0 comments on commit 296d6eb

Please sign in to comment.