From 1e6e9b66a5837d62d374edd405bdf561813ebbce Mon Sep 17 00:00:00 2001 From: Greatly Pleased Date: Fri, 10 Nov 2023 22:45:20 +0100 Subject: [PATCH] hyprctl: Fix build warnings (#3821) --- hyprctl/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hyprctl/main.cpp b/hyprctl/main.cpp index 77dd0d58..c05b5201 100644 --- a/hyprctl/main.cpp +++ b/hyprctl/main.cpp @@ -274,7 +274,6 @@ bool isNumber(const std::string& str, bool allowfloat) { } int main(int argc, char** argv) { - int bflag = 0, sflag = 0, index, c; bool parseArgs = true; if (argc < 2) { @@ -288,7 +287,7 @@ int main(int argc, char** argv) { bool json = false; std::string overrideInstance = ""; - for (auto i = 0; i < ARGS.size(); ++i) { + for (std::size_t i = 0; i < ARGS.size(); ++i) { if (ARGS[i] == "--") { // Stop parsing arguments after -- parseArgs = false; @@ -342,7 +341,7 @@ int main(int argc, char** argv) { const auto INSTANCES = instances(); - if (INSTANCENO < 0 || INSTANCENO >= INSTANCES.size()) { + if (INSTANCENO < 0 || static_cast(INSTANCENO) >= INSTANCES.size()) { std::cout << "no such instance\n"; return 1; }