mirror of
https://git.adityakumar.xyz/llama.cpp.git
synced 2024-11-09 15:29:43 +00:00
Fix msys2 build error and warnings (#1009)
This commit is contained in:
parent
74f5899df4
commit
2d3481c721
2 changed files with 6 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
||||||
#include "ggml.h"
|
#include "ggml.h"
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <ctime>
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
|
@ -43,8 +43,12 @@
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
#ifdef __MINGW32__
|
||||||
|
__attribute__((format(gnu_printf, 1, 2)))
|
||||||
|
#else
|
||||||
__attribute__((format(printf, 1, 2)))
|
__attribute__((format(printf, 1, 2)))
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
static std::string format(const char * fmt, ...) {
|
static std::string format(const char * fmt, ...) {
|
||||||
va_list ap, ap2;
|
va_list ap, ap2;
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
|
@ -57,7 +61,7 @@ static std::string format(const char * fmt, ...) {
|
||||||
va_end(ap2);
|
va_end(ap2);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
return std::string(buf.data(), size);
|
return std::string(buf.data(), size);
|
||||||
};
|
}
|
||||||
|
|
||||||
struct llama_file {
|
struct llama_file {
|
||||||
// use FILE * so we don't have to re-open the file to mmap
|
// use FILE * so we don't have to re-open the file to mmap
|
||||||
|
|
Loading…
Reference in a new issue