aboutsummaryrefslogtreecommitdiffstats
path: root/al
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 /al
parentca0a6024a322bcc160daf197215aa4deb51fce2a (diff)
Workaround mingw complaining about the %z formatter
Diffstat (limited to 'al')
-rw-r--r--al/effects/effects.h4
-rw-r--r--al/filter.cpp4
2 files changed, 8 insertions, 0 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;