diff --git a/src/osx/carbon/utilscocoa.mm b/src/osx/carbon/utilscocoa.mm index 22305a4c91..a492649cb2 100644 --- a/src/osx/carbon/utilscocoa.mm +++ b/src/osx/carbon/utilscocoa.mm @@ -597,6 +597,8 @@ wxOSXEffectiveAppearanceSetter::wxOSXEffectiveAppearanceSetter() formerAppearance = NSAppearance.currentAppearance; NSAppearance.currentAppearance = NSApp.effectiveAppearance; } +#else + wxUnusedVar(formerAppearance); #endif }