From a4fb5a9719aa57671ed2f2766d9924a1850bad32 Mon Sep 17 00:00:00 2001 From: Justin Date: Wed, 15 Mar 2023 02:37:01 +0000 Subject: [PATCH 1/2] fixed warning with std::ignore about unused function result --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 6dc9ae98036ed..2f6f6f2146757 100644 --- a/main.cpp +++ b/main.cpp @@ -1003,7 +1003,7 @@ int main(int argc, char ** argv) { if(params.use_color) printf(ANSI_BOLD ANSI_COLOR_GREEN); if (scanf("%255[^\n]%n%*c", buf, &n_read) <= 0) { // presumable empty line, consume the newline - scanf("%*c"); + std::ignore = scanf("%*c"); n_read=0; } if(params.use_color) printf(ANSI_COLOR_RESET); From 9f903475965bf571d6f52b3a9ba3c37db3e644f9 Mon Sep 17 00:00:00 2001 From: Justin Suess Date: Thu, 16 Mar 2023 12:45:24 -0400 Subject: [PATCH 2/2] Update main.cpp --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index 2f6f6f2146757..d629693d70ede 100644 --- a/main.cpp +++ b/main.cpp @@ -1003,7 +1003,7 @@ int main(int argc, char ** argv) { if(params.use_color) printf(ANSI_BOLD ANSI_COLOR_GREEN); if (scanf("%255[^\n]%n%*c", buf, &n_read) <= 0) { // presumable empty line, consume the newline - std::ignore = scanf("%*c"); + std::ignore = scanf("%*c"); n_read=0; } if(params.use_color) printf(ANSI_COLOR_RESET);