aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--al/effects/effects.h4
-rw-r--r--al/filter.cpp4
-rw-r--r--alc/alcmain.h7
-rw-r--r--alc/alcontext.h7
-rw-r--r--alc/backends/base.h4
-rw-r--r--core/logging.h7
6 files changed, 30 insertions, 3 deletions
diff --git a/al/effects/effects.h b/al/effects/effects.h
index d6c88c4f..30b4bd75 100644
--- a/al/effects/effects.h
+++ b/al/effects/effects.h
@@ -12,7 +12,11 @@ class effect_exception final : public al::base_exception {
ALenum mErrorCode;
public:
+#ifdef __USE_MINGW_ANSI_STDIO
+ [[gnu::format(gnu_printf, 3, 4)]]
+#else
[[gnu::format(printf, 3, 4)]]
+#endif
effect_exception(ALenum code, const char *msg, ...);
ALenum errorCode() const noexcept { return mErrorCode; }
diff --git a/al/filter.cpp b/al/filter.cpp
index c15b2d3e..1e7edbc2 100644
--- a/al/filter.cpp
+++ b/al/filter.cpp
@@ -52,7 +52,11 @@ class filter_exception final : public al::base_exception {
ALenum mErrorCode;
public:
+#ifdef __USE_MINGW_ANSI_STDIO
+ [[gnu::format(gnu_printf, 3, 4)]]
+#else
[[gnu::format(printf, 3, 4)]]
+#endif
filter_exception(ALenum code, const char *msg, ...) : mErrorCode{code}
{
std::va_list args;
diff --git a/alc/alcmain.h b/alc/alcmain.h
index e9309c40..762d778e 100644
--- a/alc/alcmain.h
+++ b/alc/alcmain.h
@@ -342,7 +342,12 @@ struct ALCdevice : public al::intrusive_ref<ALCdevice> {
void renderSamples(void *outBuffer, const uint numSamples, const size_t frameStep);
/* Caller must lock the device state, and the mixer must not be running. */
- [[gnu::format(printf,2,3)]] void handleDisconnect(const char *msg, ...);
+#ifdef __USE_MINGW_ANSI_STDIO
+ [[gnu::format(gnu_printf,2,3)]]
+#else
+ [[gnu::format(printf,2,3)]]
+#endif
+ void handleDisconnect(const char *msg, ...);
DEF_NEWDEL(ALCdevice)
};
diff --git a/alc/alcontext.h b/alc/alcontext.h
index 31160bb2..b1ec0a6b 100644
--- a/alc/alcontext.h
+++ b/alc/alcontext.h
@@ -259,7 +259,12 @@ struct ALCcontext : public al::intrusive_ref<ALCcontext> {
/** Resumes update processing after being deferred. */
void processUpdates();
- [[gnu::format(printf,3,4)]] void setError(ALenum errorCode, const char *msg, ...);
+#ifdef __USE_MINGW_ANSI_STDIO
+ [[gnu::format(gnu_printf, 3, 4)]]
+#else
+ [[gnu::format(printf, 3, 4)]]
+#endif
+ void setError(ALenum errorCode, const char *msg, ...);
DEF_NEWDEL(ALCcontext)
};
diff --git a/alc/backends/base.h b/alc/backends/base.h
index df076276..07a91e25 100644
--- a/alc/backends/base.h
+++ b/alc/backends/base.h
@@ -103,7 +103,11 @@ class backend_exception final : public base_exception {
backend_error mErrorCode;
public:
+#ifdef __USE_MINGW_ANSI_STDIO
+ [[gnu::format(gnu_printf, 3, 4)]]
+#else
[[gnu::format(printf, 3, 4)]]
+#endif
backend_exception(backend_error code, const char *msg, ...) : mErrorCode{code}
{
std::va_list args;
diff --git a/core/logging.h b/core/logging.h
index b931c27e..81465929 100644
--- a/core/logging.h
+++ b/core/logging.h
@@ -35,7 +35,12 @@ extern FILE *gLogFile;
#else
-[[gnu::format(printf,3,4)]] void al_print(LogLevel level, FILE *logfile, const char *fmt, ...);
+#ifdef __USE_MINGW_ANSI_STDIO
+[[gnu::format(gnu_printf,3,4)]]
+#else
+[[gnu::format(printf,3,4)]]
+#endif
+void al_print(LogLevel level, FILE *logfile, const char *fmt, ...);
#define TRACE(...) al_print(LogLevel::Trace, gLogFile, "[ALSOFT] (II) " __VA_ARGS__)