Skip to content

Commit

Permalink
Fix UB warning on OSX (#842)
Browse files Browse the repository at this point in the history
* Investigate slow binary caching performance on OSX

* ;

* include

* Fix UB & cmd test case

* Remove debugging code

Co-authored-by: Thomas1664 <>
  • Loading branch information
Thomas1664 authored Jan 9, 2023
1 parent 062d979 commit a13a8de
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion include/vcpkg/dependencies.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ namespace vcpkg

GraphRandomizer* randomizer = nullptr;
Triplet host_triplet;
UnsupportedPortAction unsupported_port_action;
UnsupportedPortAction unsupported_port_action = UnsupportedPortAction::Warn;
};

std::vector<RemovePlanAction> create_remove_plan(const std::vector<PackageSpec>& specs,
Expand Down
4 changes: 2 additions & 2 deletions src/vcpkg-test/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ TEST_CASE ("cmdlinebuilder", "[system]")
TEST_CASE ("cmd_execute_and_capture_output_parallel", "[system]")
{
std::vector<vcpkg::Command> vec;
for (size_t i = 0; i < 50; i++)
for (size_t i = 0; i < 50; ++i)
{
#if defined(_WIN32)
vcpkg::Command cmd("cmd.exe");
Expand All @@ -163,7 +163,7 @@ TEST_CASE ("cmd_execute_and_capture_output_parallel", "[system]")

auto res = vcpkg::cmd_execute_and_capture_output_parallel(vcpkg::View<vcpkg::Command>(vec));

for (size_t i = 0; i < res.size(); ++i)
for (size_t i = 0; i != res.size(); ++i)
{
auto out = res[i].get();
REQUIRE(out != nullptr);
Expand Down

0 comments on commit a13a8de

Please sign in to comment.