Add back unused-variable warning

This commit is contained in:
Patrick Nicolas
2026-10-16 08:03:21 +02:00
parent 650ca30874
commit 879c50c743
26 changed files with 24 additions and 70 deletions
+13 -13
View File
@@ -336,19 +336,19 @@ int main(int argc, char ** argv)
int pairing_duration;
auto pair_command = app.add_subcommand("pair", "Allow a new headset to connect")
->callback([&]() { return pair(pairing_duration); });
auto duration = pair_command
->add_option("--duration,-d", pairing_duration, "Duration in minutes to allow new connections")
->transform(CLI::Validator([](std::string & input) {
if (input.starts_with("-"))
throw CLI::ValidationError("duration must be positive");
if (input == "unlimited")
input = "-1";
return "";
},
"",
""))
->default_val(2)
->option_text("INT|unlimited");
pair_command
->add_option("--duration,-d", pairing_duration, "Duration in minutes to allow new connections")
->transform(CLI::Validator([](std::string & input) {
if (input.starts_with("-"))
throw CLI::ValidationError("duration must be positive");
if (input == "unlimited")
input = "-1";
return "";
},
"",
""))
->default_val(2)
->option_text("INT|unlimited");
size_t headset_id;
auto unpair_command = app.add_subcommand("unpair", "Remove a headset")