Fix callback parameter shadow in CreateInternal (#40086)

* Remove unused callback parameter from CreateInternal

The IProgressCallback* parameter was always passed as nullptr by both
callers. The auto-pull path creates its own PullImageCallback locally.
Remove the dead parameter entirely per review feedback.

* format

---------

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
This commit is contained in:
Ben Hillis
2026-04-02 18:31:56 -07:00
committed by GitHub
parent f8dc1ce035
commit d780923d9e

View File

@@ -38,8 +38,7 @@ static void SetContainerArguments(WSLCProcessOptions& options, std::vector<const
options.CommandLine = {.Values = argsStorage.data(), .Count = static_cast<ULONG>(argsStorage.size())};
}
static wsl::windows::common::RunningWSLCContainer CreateInternal(
Session& session, const std::string& image, const ContainerOptions& options, IProgressCallback* callback)
static wsl::windows::common::RunningWSLCContainer CreateInternal(Session& session, const std::string& image, const ContainerOptions& options)
{
auto processFlags = WSLCProcessFlagsNone;
WI_SetFlagIf(processFlags, WSLCProcessFlagsStdin, options.Interactive);
@@ -280,7 +279,7 @@ std::wstring ContainerService::FormatPorts(WSLCContainerState state, const std::
int ContainerService::Run(Session& session, const std::string& image, ContainerOptions runOptions)
{
// Create the container
auto runningContainer = CreateInternal(session, image, runOptions, nullptr);
auto runningContainer = CreateInternal(session, image, runOptions);
runningContainer.SetDeleteOnClose(false);
auto& container = runningContainer.Get();
@@ -304,7 +303,7 @@ int ContainerService::Run(Session& session, const std::string& image, ContainerO
CreateContainerResult ContainerService::Create(Session& session, const std::string& image, ContainerOptions runOptions)
{
auto runningContainer = CreateInternal(session, image, runOptions, nullptr);
auto runningContainer = CreateInternal(session, image, runOptions);
runningContainer.SetDeleteOnClose(false);
auto& container = runningContainer.Get();
WSLCContainerId id{};