diff --git a/src/gui/rhi/qrhimetal.mm b/src/gui/rhi/qrhimetal.mm index 170c7a2ac68..ecd6f3c2132 100644 --- a/src/gui/rhi/qrhimetal.mm +++ b/src/gui/rhi/qrhimetal.mm @@ -2333,6 +2333,9 @@ void QMetalBuffer::endFullDynamicBufferUpdateForCurrentFrame() static inline MTLPixelFormat toMetalTextureFormat(QRhiTexture::Format format, QRhiTexture::Flags flags, const QRhiMetalData *d) { +#ifndef Q_OS_MACOS + Q_UNUSED(d); +#endif const bool srgb = flags.testFlag(QRhiTexture::sRGB); switch (format) { case QRhiTexture::RGBA8: