]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
fixed warning with std::ignore about unused function result (#151)
authorJustin Suess <redacted>
Sat, 18 Mar 2023 11:44:09 +0000 (07:44 -0400)
committerGitHub <redacted>
Sat, 18 Mar 2023 11:44:09 +0000 (11:44 +0000)
fixed warning with std::ignore about unused function result

main.cpp

index 39c5d7b76b903cc1cb0cdfc70e06a485a906bebd..eb78fe5ab8152456c8f1e3745d0050f111c4e60a 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -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);