#include "coreml/whisper-encoder.h"
#endif
-#if WHISPER_USE_OPENVINO
+#ifdef WHISPER_USE_OPENVINO
#include "openvino/whisper-openvino-encoder.h"
#endif
static whisper_log_callback whisper_log = whisper_default_log;
-// TODO: fix compile warning about "format string is not a string literal"
+#ifdef __GNUC__
+#ifdef __MINGW32__
+__attribute__((gnu_format(printf, 1, 2)))
+#else
+__attribute__((format(printf, 1, 2)))
+#endif
+#endif
static void log(const char * fmt, ...) {
if (!whisper_log) return;
char buf[1024];
}
static bool hann_window(int length, bool periodic, std::vector<float> & output) {
- if (output.size() < length) {
+ if (output.size() < static_cast<size_t>(length)) {
output.resize(length);
}
int offset = -1;
#if defined(_MSC_VER) || defined(__MINGW32__)
#include <intrin.h>
#else
+#if defined(__AVX__) || defined(__AVX2__) || defined(__AVX512F__) || defined(__SSSE3__) || defined(__SSE3__)
#if !defined(__riscv)
#include <immintrin.h>
#endif
#endif
#endif
#endif
+#endif
#ifdef __riscv_v_intrinsic
#include <riscv_vector.h>