Util::unused() for commands that don't have arguments
MODIFY
src/vcpkg/commands.cache.cpp
src/vcpkg/commands.cache.cpp
@@ -38,7 +38,7 @@ namespace vcpkg::Commands::Cache
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
const std::vector<BinaryParagraph> binary_paragraphs = read_all_binary_paragraphs(paths);
if (binary_paragraphs.empty())

MODIFY
src/vcpkg/commands.create.cpp
src/vcpkg/commands.create.cpp
@@ -18,7 +18,7 @@ namespace vcpkg::Commands::Create
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
const std::string port_name = args.command_arguments.at(0);
const std::string url = args.command_arguments.at(1);

MODIFY
src/vcpkg/commands.dependinfo.cpp
src/vcpkg/commands.dependinfo.cpp
@@ -19,7 +19,7 @@ namespace vcpkg::Commands::DependInfo
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
std::vector<std::unique_ptr<SourceControlFile>> source_control_files =
Paragraphs::load_all_ports(paths.get_filesystem(), paths.ports);
@@ -30,7 +30,6 @@ namespace vcpkg::Commands::DependInfo
Util::erase_remove_if(source_control_files,
[&](const std::unique_ptr<SourceControlFile>& source_control_file) {
-
const SourceParagraph& source_paragraph = *source_control_file->core_paragraph;
if (Strings::case_insensitive_ascii_contains(source_paragraph.name, filter))

MODIFY
src/vcpkg/commands.import.cpp
src/vcpkg/commands.import.cpp
@@ -103,7 +103,7 @@ namespace vcpkg::Commands::Import
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
const fs::path control_file_path(args.command_arguments[0]);
const fs::path include_directory(args.command_arguments[1]);

MODIFY
src/vcpkg/commands.integrate.cpp
src/vcpkg/commands.integrate.cpp
@@ -352,7 +352,7 @@ With a project open, go to Tools->NuGet Package Manager->Package Manager Console
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
#if defined(_WIN32)
if (args.command_arguments[0] == Subcommand::INSTALL)

MODIFY
src/vcpkg/commands.owns.cpp
src/vcpkg/commands.owns.cpp
@@ -34,7 +34,7 @@ namespace vcpkg::Commands::Owns
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
const StatusParagraphs status_db = database_load_check(paths);
search_file(paths, args.command_arguments[0], status_db);

MODIFY
src/vcpkg/commands.portsdiff.cpp
src/vcpkg/commands.portsdiff.cpp
@@ -128,7 +128,7 @@ namespace vcpkg::Commands::PortsDiff
void perform_and_exit(const VcpkgCmdArguments& args, const VcpkgPaths& paths)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
const fs::path& git_exe = paths.get_tool_exe(Tools::GIT);

MODIFY
src/vcpkg/commands.version.cpp
src/vcpkg/commands.version.cpp
@@ -83,7 +83,7 @@ namespace vcpkg::Commands::Version
void perform_and_exit(const VcpkgCmdArguments& args)
{
- args.parse_arguments(COMMAND_STRUCTURE);
+ Util::unused(args.parse_arguments(COMMAND_STRUCTURE));
System::println("Vcpkg package management program version %s\n"
"\n"

Util::unused() for commands that don't have arguments