mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-06-27 03:55:20 +00:00
cleanup: fix compile warnings associated with gnu_printf (#11811)
This commit is contained in:
@ -424,13 +424,13 @@ bool set_process_priority(enum ggml_sched_priority prio);
|
|||||||
//
|
//
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __MINGW32__
|
# if defined(__MINGW32__) && !defined(__clang__)
|
||||||
#define LLAMA_COMMON_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
# define LLAMA_COMMON_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
||||||
|
# else
|
||||||
|
# define LLAMA_COMMON_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define LLAMA_COMMON_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
# define LLAMA_COMMON_ATTRIBUTE_FORMAT(...)
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define LLAMA_COMMON_ATTRIBUTE_FORMAT(...)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LLAMA_COMMON_ATTRIBUTE_FORMAT(1, 2)
|
LLAMA_COMMON_ATTRIBUTE_FORMAT(1, 2)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
# define LOG_ATTRIBUTE_FORMAT(...)
|
# define LOG_ATTRIBUTE_FORMAT(...)
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__) && !defined(__clang__)
|
||||||
# define LOG_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
# define LOG_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
||||||
#else
|
#else
|
||||||
# define LOG_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
# define LOG_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
||||||
|
@ -198,7 +198,7 @@
|
|||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
# define GGML_ATTRIBUTE_FORMAT(...)
|
# define GGML_ATTRIBUTE_FORMAT(...)
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__) && !defined(__clang__)
|
||||||
# define GGML_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
# define GGML_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
||||||
#else
|
#else
|
||||||
# define GGML_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
# define GGML_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#ifdef __MINGW32__
|
# if defined(__MINGW32__) && !defined(__clang__)
|
||||||
#define LLAMA_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
# define LLAMA_ATTRIBUTE_FORMAT(...) __attribute__((format(gnu_printf, __VA_ARGS__)))
|
||||||
|
# else
|
||||||
|
# define LLAMA_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define LLAMA_ATTRIBUTE_FORMAT(...) __attribute__((format(printf, __VA_ARGS__)))
|
# define LLAMA_ATTRIBUTE_FORMAT(...)
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#define LLAMA_ATTRIBUTE_FORMAT(...)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -697,8 +697,8 @@ static std::pair<int, int> test_handcrafted_file(const unsigned int seed) {
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!file) {
|
if (!file) {
|
||||||
printf("%s: failed to create tmpfile(), needs elevated privileges on Windows");
|
printf("failed to create tmpfile(), needs elevated privileges on Windows");
|
||||||
printf("%s: skipping tests");
|
printf("skipping tests");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
@ -1086,8 +1086,8 @@ static std::pair<int, int> test_roundtrip(ggml_backend_dev_t dev, const unsigned
|
|||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
if (!file) {
|
if (!file) {
|
||||||
printf("%s: failed to create tmpfile(), needs elevated privileges on Windows");
|
printf("failed to create tmpfile(), needs elevated privileges on Windows");
|
||||||
printf("%s: skipping tests");
|
printf("skipping tests");
|
||||||
return std::make_pair(0, 0);
|
return std::make_pair(0, 0);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
Reference in New Issue
Block a user