diff options
author | nanahi <130121847+na-na-hi@users.noreply.github.com> | 2023-04-16 17:13:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-16 11:13:42 +0200 |
commit | 2d3481c72125cd388258864c7ad8d7d36777bad7 (patch) | |
tree | 04ee5e343463cf453de5b35f3988336ab961fdca /llama_util.h | |
parent | 74f5899df4a6083fc467b620baa1cf821e37799d (diff) |
Fix msys2 build error and warnings (#1009)
Diffstat (limited to 'llama_util.h')
-rwxr-xr-x | llama_util.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llama_util.h b/llama_util.h index 653bf71..d2110eb 100755 --- a/llama_util.h +++ b/llama_util.h @@ -43,8 +43,12 @@ } while (0) #ifdef __GNUC__ +#ifdef __MINGW32__ +__attribute__((format(gnu_printf, 1, 2))) +#else __attribute__((format(printf, 1, 2))) #endif +#endif static std::string format(const char * fmt, ...) { va_list ap, ap2; va_start(ap, fmt); @@ -57,7 +61,7 @@ static std::string format(const char * fmt, ...) { va_end(ap2); va_end(ap); return std::string(buf.data(), size); -}; +} struct llama_file { // use FILE * so we don't have to re-open the file to mmap |