aboutsummaryrefslogtreecommitdiffstats
path: root/alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2021-03-12 03:14:29 -0800
committerChris Robinson <[email protected]>2021-03-12 03:14:29 -0800
commitc1f0555fef488df0085961710320051c650beecd (patch)
treed8dd9ab9f5841950769720262824e8d81c075828 /alc
parentca0a6024a322bcc160daf197215aa4deb51fce2a (diff)
Workaround mingw complaining about the %z formatter
Diffstat (limited to 'alc')
-rw-r--r--alc/alcmain.h7
-rw-r--r--alc/alcontext.h7
-rw-r--r--alc/backends/base.h4
3 files changed, 16 insertions, 2 deletions
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;