fixed warning with std::ignore about unused function result (#151)

fixed warning with std::ignore about unused function result
This commit is contained in:
Justin Suess 2023-03-18 07:44:09 -04:00 committed by GitHub
parent a81d0c2a17
commit e03e359730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1011,7 +1011,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);