mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-01-24 14:58:43 +01:00
build: fix and ignore msvc warnings (ggml/805)
This commit is contained in:
parent
73d13ad19a
commit
8dcefdf4a9
@ -1178,9 +1178,9 @@ static int ggml_backend_sched_backend_id_from_cur(ggml_backend_sched_t sched, st
|
||||
static char * fmt_size(size_t size) {
|
||||
static char buffer[128];
|
||||
if (size >= 1024*1024) {
|
||||
sprintf(buffer, "%zuM", size/1024/1024);
|
||||
snprintf(buffer, sizeof(buffer), "%zuM", size/1024/1024);
|
||||
} else {
|
||||
sprintf(buffer, "%zuK", size/1024);
|
||||
snprintf(buffer, sizeof(buffer), "%zuK", size/1024);
|
||||
}
|
||||
return buffer;
|
||||
}
|
||||
|
@ -14,6 +14,12 @@
|
||||
#include <stdlib.h> // for qsort
|
||||
#include <stdio.h> // for GGML_ASSERT
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
// disable "possible loss of data" to avoid warnings for hundreds of casts
|
||||
// we should just be careful :)
|
||||
#pragma warning(disable: 4244 4267)
|
||||
#endif
|
||||
|
||||
#ifdef __ARM_NEON
|
||||
|
||||
// if YCM cannot find <arm_neon.h>, make a symbolic link to it, for example:
|
||||
|
Loading…
Reference in New Issue
Block a user