From 9cbf50c041a525d781c7764f493a5443924e4e38 Mon Sep 17 00:00:00 2001 From: Borislav Stanimirov Date: Fri, 16 Jun 2023 21:23:53 +0300 Subject: build : fix and ignore MSVC warnings (#1889) --- examples/main/main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'examples/main/main.cpp') diff --git a/examples/main/main.cpp b/examples/main/main.cpp index efa913e1..ef9e75fa 100644 --- a/examples/main/main.cpp +++ b/examples/main/main.cpp @@ -28,6 +28,10 @@ #include #endif +#if defined(_MSC_VER) +#pragma warning(disable: 4244 4267) // possible loss of data +#endif + static console_state con_st; static llama_context ** g_ctx; @@ -348,7 +352,7 @@ int main(int argc, char ** argv) { if ((int)embd.size() > max_embd_size) { auto skipped_tokens = embd.size() - max_embd_size; console_set_color(con_st, CONSOLE_COLOR_ERROR); - printf("<>", skipped_tokens, skipped_tokens != 1 ? "s" : ""); + printf("<>", skipped_tokens, skipped_tokens != 1 ? "s" : ""); console_set_color(con_st, CONSOLE_COLOR_DEFAULT); fflush(stdout); embd.resize(max_embd_size); -- cgit v1.2.3