diff options
author | Cebtenzzre <cebtenzzre@gmail.com> | 2023-09-01 09:34:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-01 16:34:50 +0300 |
commit | ef156499721c67748cde01a5436cb6f0648bb4b4 (patch) | |
tree | f979837d94e3deab68d38b08ce70441123c888c8 /common | |
parent | d8d6977f48f1fa402ade38ad32c5b5fb1358d059 (diff) |
build : fix most gcc and clang warnings (#2861)
* fix most gcc and clang warnings
* baby-llama : remove commented opt_params_adam
* fix some MinGW warnings
* fix more MinGW warnings
Diffstat (limited to 'common')
-rw-r--r-- | common/common.cpp | 6 | ||||
-rw-r--r-- | common/console.cpp | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/common/common.cpp b/common/common.cpp index ed09fc27..41fc59ce 100644 --- a/common/common.cpp +++ b/common/common.cpp @@ -24,7 +24,9 @@ #if defined(_WIN32) #define WIN32_LEAN_AND_MEAN -#define NOMINMAX +#ifndef NOMINMAX +# define NOMINMAX +#endif #include <codecvt> #include <locale> #include <windows.h> @@ -1027,7 +1029,7 @@ void dump_non_result_info_yaml(FILE * stream, const gpt_params & params, const l dump_string_yaml_multiline(stream, "grammar", params.grammar.c_str()); fprintf(stream, "grammar-file: # never logged, see grammar instead. Can still be specified for input.\n"); fprintf(stream, "hellaswag: %s # default: false\n", params.hellaswag ? "true" : "false"); - fprintf(stream, "hellaswag_tasks: %ld # default: 400\n", params.hellaswag_tasks); + fprintf(stream, "hellaswag_tasks: %zu # default: 400\n", params.hellaswag_tasks); const auto logit_bias_eos = params.logit_bias.find(llama_token_eos(lctx)); const bool ignore_eos = logit_bias_eos != params.logit_bias.end() && logit_bias_eos->second == -INFINITY; diff --git a/common/console.cpp b/common/console.cpp index 8efa2a67..23545e5b 100644 --- a/common/console.cpp +++ b/common/console.cpp @@ -235,6 +235,7 @@ namespace console { int estimateWidth(char32_t codepoint) { #if defined(_WIN32) + (void)codepoint; return 1; #else return wcwidth(codepoint); |