Index: /trunk/Config.kmk
===================================================================
--- /trunk/Config.kmk	(revision 100107)
+++ /trunk/Config.kmk	(revision 100108)
@@ -1065,5 +1065,5 @@
 ## @{
 # For treating compiler and linker warnings as errors where possible.
-if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 linux.x86 linux.amd64 win.x86 win.amd64)
+if1of ($(KBUILD_TARGET).$(KBUILD_TARGET_ARCH), darwin.x86 darwin.amd64 darwin.arm64 linux.x86 linux.amd64 win.x86 win.amd64)
  VBOX_WITH_WARNINGS_AS_ERRORS = 1
 endif
Index: /trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3Lib.cpp
===================================================================
--- /trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3Lib.cpp	(revision 100107)
+++ /trunk/src/VBox/Additions/common/VBoxGuest/lib/VBoxGuestR3Lib.cpp	(revision 100108)
@@ -232,5 +232,7 @@
    /* IOKit */
     mach_port_t MasterPort;
-    kern_return_t kr = IOMasterPort(MACH_PORT_NULL, &MasterPort);
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    kern_return_t kr = IOMasterPort(MACH_PORT_NULL, &MasterPort); /* Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (kr != kIOReturnSuccess)
     {
@@ -246,5 +248,7 @@
     }
 
-    io_service_t ServiceObject = IOServiceGetMatchingService(kIOMasterPortDefault, ClassToMatch);
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    io_service_t ServiceObject = IOServiceGetMatchingService(kIOMasterPortDefault, ClassToMatch); /* kIOMasterPortDefault: Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (!ServiceObject)
     {
Index: /trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp
===================================================================
--- /trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp	(revision 100107)
+++ /trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardGuestToHost.cpp	(revision 100108)
@@ -46,4 +46,6 @@
 #include "VBoxClientInternal.h"
 
+RT_GCC_NO_WARN_DEPRECATED_BEGIN /* Much here is deprecated since 12.0 */
+
 /**
  * Walk through pasteboard items and report currently available item types.
@@ -389,2 +391,4 @@
     return rc; /** @todo r=bird: If there are multiple formats available, which rc is returned here? Does it matter? */
 }
+
+RT_GCC_NO_WARN_DEPRECATED_END
Index: /trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp
===================================================================
--- /trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp	(revision 100107)
+++ /trunk/src/VBox/Additions/darwin/VBoxClient/VBoxClientClipboardHostToGuest.cpp	(revision 100108)
@@ -46,4 +46,6 @@
 #include "VBoxClientInternal.h"
 
+RT_GCC_NO_WARN_DEPRECATED_BEGIN /* Much here is deprecated since 12.0 */
+
 /**
  * Allocate memory for host buffer and receive it.
@@ -314,2 +316,4 @@
     return rc;
 }
+
+RT_GCC_NO_WARN_DEPRECATED_END
Index: /trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp
===================================================================
--- /trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp	(revision 100107)
+++ /trunk/src/VBox/Debugger/DBGCGdbRemoteStub.cpp	(revision 100108)
@@ -1673,5 +1673,5 @@
     if (*pbPktRem == 'g')
     {
-        cbPktRem--;
+        /*Unused: cbPktRem--;*/ RT_NOREF(cbPktRem);
         pbPktRem++;
 
Index: /trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp
===================================================================
--- /trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/Audio/DrvHostAudioCoreAudio.cpp	(revision 100108)
@@ -62,4 +62,7 @@
 #include <AudioToolbox/AudioQueue.h>
 #include <AudioUnit/AudioUnit.h>
+
+
+RT_GCC_NO_WARN_DEPRECATED_BEGIN /* Much here is deprecated since 12.0 */
 
 #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 /* possibly 1080 */
@@ -2924,2 +2927,4 @@
     PDM_DRVREG_VERSION
 };
+
+RT_GCC_NO_WARN_DEPRECATED_END
Index: /trunk/src/VBox/Devices/EFI/DevSmc.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/DevSmc.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/EFI/DevSmc.cpp	(revision 100108)
@@ -543,6 +543,8 @@
     AssertReturn(cbKey >= 65, VERR_INTERNAL_ERROR);
 
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN /* kIOMasterPortDefault: Deprecated since 12.0. */
     io_service_t service = IOServiceGetMatchingService(kIOMasterPortDefault,
                                                        IOServiceMatching("AppleSMC"));
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (!service)
         return VERR_NOT_FOUND;
Index: /trunk/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp
===================================================================
--- /trunk/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/EFI/VBoxSmcUtil-darwin.cpp	(revision 100108)
@@ -124,5 +124,7 @@
 static int ConnectToSmc(void)
 {
-    g_hSmcService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleSMC"));
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    g_hSmcService = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("AppleSMC")); /* kIOMasterPortDefault: Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (g_hSmcService == IO_OBJECT_NULL)
         return VERR_NOT_FOUND;
Index: /trunk/src/VBox/Devices/Gpio/DevPL061.cpp
===================================================================
--- /trunk/src/VBox/Devices/Gpio/DevPL061.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/Gpio/DevPL061.cpp	(revision 100108)
@@ -184,5 +184,5 @@
     RT_NOREF(pvUser);
     Assert(cb == 4);
-    Assert(!(off & (cb - 1)));
+    Assert(!(off & (cb - 1))); RT_NOREF(cb);
 
     LogFlowFunc(("%RGp cb=%u\n", off, cb));
Index: /trunk/src/VBox/Devices/Graphics/DevVGA.cpp
===================================================================
--- /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/Graphics/DevVGA.cpp	(revision 100108)
@@ -2370,5 +2370,5 @@
          * anything wider than 2050 pixels @32bpp. Need to check all pages
          * between the first and last one. */
-        bool     fUpdate    = fFullUpdate | vgaR3IsDirty(pThis, offPage0) | vgaR3IsDirty(pThis, offPage1);
+        bool     fUpdate    = fFullUpdate || vgaR3IsDirty(pThis, offPage0) || vgaR3IsDirty(pThis, offPage1);
         if (offPage1 - offPage0 > GUEST_PAGE_SIZE)
             /* if wide line, can use another page */
@@ -2569,5 +2569,5 @@
          * anything wider than 2050 pixels @32bpp. Need to check all pages
          * between the first and last one. */
-        bool update = full_update | vgaR3IsDirty(pThis, page0) | vgaR3IsDirty(pThis, page1);
+        bool update = full_update || vgaR3IsDirty(pThis, page0) || vgaR3IsDirty(pThis, page1);
         if (page1 - page0 > GUEST_PAGE_SIZE) {
             /* if wide line, can use another page */
Index: /trunk/src/VBox/Devices/Misc/DevPL031.cpp
===================================================================
--- /trunk/src/VBox/Devices/Misc/DevPL031.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/Misc/DevPL031.cpp	(revision 100108)
@@ -243,5 +243,5 @@
     NOREF(pvUser);
     Assert(cb == 4 || cb == 8);
-    Assert(!(off & (cb - 1)));
+    Assert(!(off & (cb - 1))); RT_NOREF(cb);
 
     LogFlowFunc(("%RGp cb=%u\n", off, cb));
@@ -317,5 +317,5 @@
     RT_NOREF(pvUser);
     Assert(cb == 4 || cb == 8);
-    Assert(!(off & (cb - 1)));
+    Assert(!(off & (cb - 1))); RT_NOREF(cb);
 
     VBOXSTRICTRC rcStrict = VINF_SUCCESS;
@@ -493,4 +493,5 @@
 
     Assert(iInstance < 4);
+    RT_NOREF(iInstance);
 
     /*
Index: /trunk/src/VBox/Devices/Serial/DevPL011.cpp
===================================================================
--- /trunk/src/VBox/Devices/Serial/DevPL011.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/Serial/DevPL011.cpp	(revision 100108)
@@ -615,5 +615,5 @@
     NOREF(pvUser);
     Assert(cb == 4 || cb == 8);
-    Assert(!(off & (cb - 1)));
+    Assert(!(off & (cb - 1))); RT_NOREF(cb);
 
     LogFlowFunc(("%RGp cb=%u\n", off, cb));
@@ -674,5 +674,5 @@
     RT_NOREF(pvUser);
     Assert(cb == 4 || cb == 8);
-    Assert(!(off & (cb - 1)));
+    Assert(!(off & (cb - 1))); RT_NOREF(cb);
 
     VBOXSTRICTRC rcStrict = VINF_SUCCESS;
@@ -714,5 +714,5 @@
 
     /** @todo */
-    RT_NOREF(pThis);
+    RT_NOREF(pThis, cbAvail);
 
     PDMDevHlpCritSectLeave(pDevIns, pDevIns->pCritSectRoR3);
@@ -780,5 +780,5 @@
 
     /** @todo */
-    RT_NOREF(pThis);
+    RT_NOREF(pThis, fNewStatusLines);
 
     PDMDevHlpCritSectLeave(pDevIns, pDevIns->pCritSectRoR3);
Index: /trunk/src/VBox/Devices/Storage/DrvHostBase-darwin.cpp
===================================================================
--- /trunk/src/VBox/Devices/Storage/DrvHostBase-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/Storage/DrvHostBase-darwin.cpp	(revision 100108)
@@ -524,5 +524,7 @@
      * Open the master port on the first invocation.
      */
-    kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &pThis->Os.MasterPort);
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &pThis->Os.MasterPort); /* Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     AssertReturn(krc == KERN_SUCCESS, VERR_GENERAL_FAILURE);
 
Index: /trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp
===================================================================
--- /trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/Devices/USB/darwin/USBProxyDevice-darwin.cpp	(revision 100108)
@@ -293,5 +293,7 @@
 
     int rc;
-    kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &g_MasterPort);
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &g_MasterPort);  /* Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (krc == KERN_SUCCESS)
     {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp	(revision 100107)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/helpbrowser/UIHelpViewer.cpp	(revision 100108)
@@ -826,13 +826,9 @@
     QTextCursor cursor(pDocument);
     QTextDocument::FindFlags flags;
-    int iMatchCount = 0;
     while (!cursor.isNull() && !cursor.atEnd())
     {
         cursor = pDocument->find(searchString, cursor, flags);
         if (!cursor.isNull())
-        {
             m_matchedCursorPosition << cursor.position() - searchString.length();
-            ++iMatchCount;
-        }
     }
 }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp	(revision 100107)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerFilterPanel.cpp	(revision 100108)
@@ -319,5 +319,4 @@
     /* Prepare filter-data: */
     QString strFilteredText;
-    int count = 0;
     for (int lineIdx = 0; lineIdx < stringLines.size(); ++lineIdx)
     {
@@ -326,8 +325,5 @@
             continue;
         if (applyFilterTermsToString(currentLineString))
-        {
             strFilteredText.append(currentLineString).append("\n");
-            ++count;
-        }
     }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp	(revision 100107)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/platform/darwin/DarwinKeyboard.cpp	(revision 100108)
@@ -1724,4 +1724,5 @@
             rc = (*ppUsbDeviceInterface)->GetDeviceClass   (ppUsbDeviceInterface,  &idDeviceClass);    AssertMsg(rc == 0, ("Failed to get Device Class"));
             rc = (*ppUsbDeviceInterface)->GetDeviceSubClass(ppUsbDeviceInterface,  &idDeviceSubClass); AssertMsg(rc == 0, ("Failed to get Device Subclass"));
+            RT_NOREF(rc);
 
             if (idDeviceClass == kUSBHIDInterfaceClass && idDeviceSubClass == kUSBHIDBootInterfaceSubClass)
@@ -1758,5 +1759,7 @@
     if (pDictionary)
     {
-        pHidState->pNotificationPrortRef = IONotificationPortCreate(kIOMasterPortDefault);
+        RT_GCC_NO_WARN_DEPRECATED_BEGIN
+        pHidState->pNotificationPrortRef = IONotificationPortCreate(kIOMasterPortDefault); /* kIOMasterPortDefault: Deprecated since 12.0. */
+        RT_GCC_NO_WARN_DEPRECATED_END
         if (pHidState->pNotificationPrortRef)
         {
Index: /trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp
===================================================================
--- /trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/HostDrivers/Support/darwin/SUPLib-darwin.cpp	(revision 100108)
@@ -145,5 +145,7 @@
      */
     mach_port_t MasterPort;
-    kern_return_t kr = IOMasterPort(MACH_PORT_NULL, &MasterPort);
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    kern_return_t kr = IOMasterPort(MACH_PORT_NULL, &MasterPort); /* Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (kr != kIOReturnSuccess)
     {
Index: /trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp
===================================================================
--- /trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp	(revision 100107)
+++ /trunk/src/VBox/HostServices/SharedClipboard/darwin-pasteboard.cpp	(revision 100108)
@@ -51,4 +51,6 @@
 #define WITH_HTML_H2G 1
 #define WITH_HTML_G2H 1
+
+RT_GCC_NO_WARN_DEPRECATED_BEGIN /* Much here is deprecated since 12.0 */
 
 /* For debugging */
@@ -717,2 +719,3 @@
 }
 
+RT_GCC_NO_WARN_DEPRECATED_END
Index: /trunk/src/VBox/ImageMounter/vboximg-mount/SelfSizingTable.h
===================================================================
--- /trunk/src/VBox/ImageMounter/vboximg-mount/SelfSizingTable.h	(revision 100107)
+++ /trunk/src/VBox/ImageMounter/vboximg-mount/SelfSizingTable.h	(revision 100108)
@@ -270,5 +270,5 @@
     {
         uint8_t colWidth = pColDesc->cbWidestDataInCol;
-        char colHdr[colWidth + 1], *pszColHdr = (char *)colHdr;
+        char *pszColHdr = new char[colWidth + 1];
         switch (pColDesc->alignment)
         {
@@ -288,4 +288,5 @@
         RTPrintf(ANSI_RESET);
         pColDesc = pColDesc->next;
+        delete[] pszColHdr;
     }
     RTPrintf("\n");
@@ -300,5 +301,5 @@
         {   pColDesc = pColData->pColDesc;
             uint8_t colWidth = pColDesc->cbWidestDataInCol;
-            char aCell[colWidth + 1];
+            char *aCell = new char[colWidth + 1];
             switch (pColDesc->alignment)
             {
@@ -316,4 +317,5 @@
             RTPrintf("%s%*s", aCell, cbPad, " ");
             pColData = pColData->next;
+            delete[] aCell;
         }
         RTPrintf("\n");
Index: /trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp
===================================================================
--- /trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp	(revision 100107)
+++ /trunk/src/VBox/Main/src-client/ConsoleImplConfigArmV8.cpp	(revision 100108)
@@ -95,5 +95,5 @@
 {
     RT_NOREF(pVM /* when everything is disabled */);
-    VMMDev         *pVMMDev   = m_pVMMDev; Assert(pVMMDev);
+    VMMDev         *pVMMDev   = m_pVMMDev; Assert(pVMMDev); RT_NOREF(pVMMDev); /** @todo Comes later. */
     ComPtr<IMachine> pMachine = i_machine();
 
@@ -171,5 +171,5 @@
         Assert(idPHandleIntCtrl != UINT32_MAX);
         uint32_t idPHandleIntCtrlMsi = RTFdtPHandleAllocate(hFdt);
-        Assert(idPHandleIntCtrlMsi != UINT32_MAX);
+        Assert(idPHandleIntCtrlMsi != UINT32_MAX); RT_NOREF(idPHandleIntCtrlMsi);
         uint32_t idPHandleAbpPClk = RTFdtPHandleAllocate(hFdt);
         Assert(idPHandleAbpPClk != UINT32_MAX);
Index: /trunk/src/VBox/Main/src-server/HostImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 100107)
+++ /trunk/src/VBox/Main/src-server/HostImpl.cpp	(revision 100108)
@@ -1347,4 +1347,5 @@
     *aValEDX = uEDX;
 #else
+    RT_NOREF(aLeaf, aSubLeaf);
     *aValEAX = 0;
     *aValEBX = 0;
Index: /trunk/src/VBox/Main/src-server/PerformanceImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/PerformanceImpl.cpp	(revision 100107)
+++ /trunk/src/VBox/Main/src-server/PerformanceImpl.cpp	(revision 100108)
@@ -564,5 +564,7 @@
 
     AutoWriteLock alock(this COMMA_LOCKVAL_SRC_POS);
+#ifdef LOG_ENABLED
     int n = 0;
+#endif
     BaseMetricList::iterator it;
     for (it = m.baseMetrics.begin(); it != m.baseMetrics.end(); ++it)
@@ -570,5 +572,7 @@
         {
             (*it)->unregister();
+#ifdef LOG_ENABLED
             ++n;
+#endif
         }
     Log7Func(("{%p}: obj=%p, name=%s, marked %d metrics\n", this, (void *)aObject, name.c_str(), n));
Index: /trunk/src/VBox/Main/src-server/UnattendedImpl.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/UnattendedImpl.cpp	(revision 100107)
+++ /trunk/src/VBox/Main/src-server/UnattendedImpl.cpp	(revision 100108)
@@ -1763,5 +1763,5 @@
         const char *pszArch     = NULL;
         char       *psz         = pBuf->sz;
-        for (unsigned i = 0; *psz != '\0'; i++)
+        while (*psz != '\0')
         {
             while (RT_C_IS_BLANK(*psz))
Index: /trunk/src/VBox/Main/src-server/darwin/iokit.cpp
===================================================================
--- /trunk/src/VBox/Main/src-server/darwin/iokit.cpp	(revision 100107)
+++ /trunk/src/VBox/Main/src-server/darwin/iokit.cpp	(revision 100108)
@@ -121,5 +121,7 @@
     if (!g_MasterPort)
     {
-        kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &g_MasterPort);
+        RT_GCC_NO_WARN_DEPRECATED_BEGIN
+        kern_return_t krc = IOMasterPort(MACH_PORT_NULL, &g_MasterPort); /* Deprecated since 12.0. */
+        RT_GCC_NO_WARN_DEPRECATED_END
         AssertReturn(krc == KERN_SUCCESS, false);
 
@@ -1095,5 +1097,4 @@
     PUSBDEVICE pHead = NULL;
     PUSBDEVICE pTail = NULL;
-    unsigned i = 0;
     io_object_t USBDevice;
     while ((USBDevice = IOIteratorNext(USBDevices)) != IO_OBJECT_NULL)
@@ -1233,5 +1234,4 @@
 
         IOObjectRelease(USBDevice);
-        i++;
     }
 
@@ -1456,5 +1456,4 @@
     PDARWINFIXEDDRIVE pHead = NULL;
     PDARWINFIXEDDRIVE pTail = NULL;
-    unsigned i = 0;
     io_object_t MediaService;
     while ((MediaService = IOIteratorNext(MediaServices)) != IO_OBJECT_NULL)
@@ -1577,5 +1576,4 @@
         }
         IOObjectRelease(MediaService);
-        i++;
     }
     IOObjectRelease(MediaServices);
Index: /trunk/src/VBox/Runtime/common/log/logcom.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/log/logcom.cpp	(revision 100107)
+++ /trunk/src/VBox/Runtime/common/log/logcom.cpp	(revision 100108)
@@ -150,4 +150,5 @@
     }
 #else
+    RT_NOREF(pach, cb);
     /* PORTME? */
 #endif
Index: /trunk/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/Runtime/r3/darwin/RTCrStoreCreateSnapshotById-darwin.cpp	(revision 100108)
@@ -181,5 +181,8 @@
      */
     SecKeychainRef hKeychain;
-    OSStatus orc = SecKeychainOpen(pszKeychain, &hKeychain);
+
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    OSStatus orc = SecKeychainOpen(pszKeychain, &hKeychain); /* Deprecated since 12.0 */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (orc == noErr)
     {
Index: /trunk/src/VBox/Runtime/r3/darwin/RTMpGetDescription-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/darwin/RTMpGetDescription-generic.cpp	(revision 100107)
+++ /trunk/src/VBox/Runtime/r3/darwin/RTMpGetDescription-generic.cpp	(revision 100108)
@@ -71,5 +71,8 @@
     char szArmCpuPath[64];
     RTStrPrintf(szArmCpuPath, sizeof(szArmCpuPath), "IODeviceTree:/cpus/cpu%x", idCpu); /** @todo Hex? M1 Max only has 10 cores... */
-    io_registry_entry_t hIoRegEntry = IORegistryEntryFromPath(kIOMasterPortDefault, szArmCpuPath);
+
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    io_registry_entry_t hIoRegEntry = IORegistryEntryFromPath(kIOMasterPortDefault, szArmCpuPath); /* kIOMasterPortDefault: Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (hIoRegEntry != MACH_PORT_NULL)
     {
Index: /trunk/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/Runtime/r3/darwin/RTSystemQueryDmiString-darwin.cpp	(revision 100108)
@@ -82,5 +82,8 @@
 
     mach_port_t MasterPort;
-    kern_return_t kr = IOMasterPort(MACH_PORT_NULL, &MasterPort);
+
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    kern_return_t kr = IOMasterPort(MACH_PORT_NULL, &MasterPort); /* Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
     if (kr != kIOReturnSuccess)
     {
Index: /trunk/src/VBox/Runtime/r3/darwin/mp-darwin.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/darwin/mp-darwin.cpp	(revision 100107)
+++ /trunk/src/VBox/Runtime/r3/darwin/mp-darwin.cpp	(revision 100108)
@@ -370,5 +370,9 @@
     RTStrPrintf(szCpuPath, sizeof(szCpuPath), "IODeviceTree:/cpus/cpu%x", idCpu); /** @todo Hex? M1 Max only has 10 cores... */
 # endif
-    io_registry_entry_t hIoRegEntry = IORegistryEntryFromPath(kIOMasterPortDefault, szCpuPath);
+
+    RT_GCC_NO_WARN_DEPRECATED_BEGIN
+    io_registry_entry_t hIoRegEntry = IORegistryEntryFromPath(kIOMasterPortDefault, szCpuPath); /* kIOMasterPortDefault: Deprecated since 12.0. */
+    RT_GCC_NO_WARN_DEPRECATED_END
+
     if (hIoRegEntry != MACH_PORT_NULL)
     {
Index: /trunk/src/VBox/Runtime/testcase/tstPrfRT.cpp
===================================================================
--- /trunk/src/VBox/Runtime/testcase/tstPrfRT.cpp	(revision 100107)
+++ /trunk/src/VBox/Runtime/testcase/tstPrfRT.cpp	(revision 100108)
@@ -125,4 +125,5 @@
 void PrintResult(uint64_t cNs, uint64_t cNsMax, uint64_t cNsMin, unsigned cTimes, const char *pszOperation)
 {
+    RT_NOREF(cNsMax, cNsMin);
     //RTTestPrintf(g_hTest, RTTESTLVL_ALWAYS,
     //             "%-32s %5lld / %5lld / %5lld ns per call (%u calls %lld ns)\n",
Index: /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs-armv8.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs-armv8.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/CPUMAllRegs-armv8.cpp	(revision 100108)
@@ -200,4 +200,5 @@
     AssertReturnVoid(pcLinearAddrWidth);
     AssertReleaseFailed();
+    RT_NOREF(pVM);
 }
 
@@ -320,4 +321,5 @@
     CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PC | CPUMCTX_EXTRN_PSTATE);
     AssertReleaseFailed();
+    RT_NOREF(pVCpu);
     return CPUMMODE_REAL;
 }
@@ -334,4 +336,5 @@
     CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PC | CPUMCTX_EXTRN_PSTATE);
     AssertReleaseFailed();
+    RT_NOREF(pVCpu);
     return 16;
 }
@@ -342,4 +345,5 @@
     CPUM_INT_ASSERT_NOT_EXTRN(pVCpu, CPUMCTX_EXTRN_PC | CPUMCTX_EXTRN_PSTATE);
     AssertReleaseFailed();
+    RT_NOREF(pVCpu);
     return DISCPUMODE_16BIT;
 }
@@ -396,4 +400,6 @@
         CASE_RET_STR(kCpumMicroarch_Apple_M1);
 #undef CASE_RET_STR
+        default:
+            break;
     }
 
Index: /trunk/src/VBox/VMM/VMMAll/GICAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/GICAll.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/GICAll.cpp	(revision 100108)
@@ -405,4 +405,11 @@
     PGICDEV pThis  = PDMDEVINS_2_DATA(pDevIns, PGICDEV);
     PVMCC    pVM   = PDMDevHlpGetVM(pDevIns);
+
+    if (offReg >= GIC_DIST_REG_IROUTERn_OFF_START && offReg <= GIC_DIST_REG_IROUTERn_OFF_LAST)
+    {
+        /** @todo Ignored for now, probably make this a MMIO2 region as it begins on 0x6000, see 12.9.22 of the GICv3 architecture
+         * reference manual. */
+        return VINF_SUCCESS;
+    }
 
     VBOXSTRICTRC rcStrict = VINF_SUCCESS;
@@ -505,8 +512,4 @@
         case GIC_DIST_REG_INMIn_OFF_START:
             AssertReleaseFailed();
-            break;
-        case GIC_DIST_REG_IROUTERn_OFF_START ... GIC_DIST_REG_IROUTERn_OFF_LAST: /* Only 32 lines for now. */
-            /** @todo Ignored for now, probably make this a MMIO2 region as it begins on 0x6000, see 12.9.22 of the GICv3 architecture
-             * reference manual. */
             break;
         default:
@@ -1111,4 +1114,5 @@
     LogFlowFunc(("GIC%u\n", pVCpu->idCpu));
     VMCPU_ASSERT_EMT_OR_NOT_RUNNING(pVCpu);
+    RT_NOREF(pVCpu);
 }
 
Index: /trunk/src/VBox/VMM/VMMAll/GIMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/GIMAll.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/GIMAll.cpp	(revision 100108)
@@ -155,4 +155,8 @@
 VMM_INT_DECL(VBOXSTRICTRC) GIMHypercall(PVMCPUCC pVCpu, PCPUMCTX pCtx)
 {
+#if defined(VBOX_VMM_TARGET_ARMV8)
+    RT_NOREF(pCtx);
+#endif
+
     PVMCC pVM = pVCpu->CTX_SUFF(pVM);
     VMCPU_ASSERT_EMT(pVCpu);
@@ -207,4 +211,8 @@
 VMM_INT_DECL(VBOXSTRICTRC) GIMHypercallEx(PVMCPUCC pVCpu, PCPUMCTX pCtx, unsigned uDisOpcode, uint8_t cbInstr)
 {
+#if defined(VBOX_VMM_TARGET_ARMV8)
+    RT_NOREF(pCtx, uDisOpcode, cbInstr);
+#endif
+
     PVMCC pVM = pVCpu->CTX_SUFF(pVM);
     VMCPU_ASSERT_EMT(pVCpu);
@@ -243,4 +251,8 @@
 VMM_INT_DECL(VBOXSTRICTRC) GIMExecHypercallInstr(PVMCPUCC pVCpu, PCPUMCTX pCtx, uint8_t *pcbInstr)
 {
+#if defined(VBOX_VMM_TARGET_ARMV8)
+    RT_NOREF(pCtx);
+#endif
+
     PVMCC pVM = pVCpu->CTX_SUFF(pVM);
     VMCPU_ASSERT_EMT(pVCpu);
@@ -365,4 +377,8 @@
 VMM_INT_DECL(VBOXSTRICTRC) GIMXcptUD(PVMCPUCC pVCpu, PCPUMCTX pCtx, PDISSTATE pDis, uint8_t *pcbInstr)
 {
+#if defined(VBOX_VMM_TARGET_ARMV8)
+    RT_NOREF(pCtx, pDis, pcbInstr);
+#endif
+
     PVMCC pVM = pVCpu->CTX_SUFF(pVM);
     Assert(GIMIsEnabled(pVM));
Index: /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/IEMAllCImpl.cpp	(revision 100108)
@@ -7508,5 +7508,5 @@
     }
 #endif
-#if defined(VBOX_WITH_NESTED_HWVIRT_VMX) || defined(VBOX_WITH_NESTED_HWVIRT_SVM)
+#if !defined(VBOX_WITH_NESTED_HWVIRT_VMX) && !defined(VBOX_WITH_NESTED_HWVIRT_SVM)
     RT_NOREF(bImmAndEffAddrMode);
 #endif
@@ -7624,5 +7624,5 @@
     }
 #endif
-#if defined(VBOX_WITH_NESTED_HWVIRT_VMX) || defined(VBOX_WITH_NESTED_HWVIRT_SVM)
+#if !defined(VBOX_WITH_NESTED_HWVIRT_VMX) && !defined(VBOX_WITH_NESTED_HWVIRT_SVM)
     RT_NOREF(bImmAndEffAddrMode);
 #endif
Index: /trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/IOMAllMmioNew.cpp	(revision 100108)
@@ -1088,4 +1088,5 @@
 #if defined(VBOX_VMM_TARGET_ARMV8)
     /** @todo NEM: MMIO page aliasing. */
+    RT_NOREF(pVM, hRegion, offRegion, hMmio2, offMmio2);
     return VINF_SUCCESS;    /* ignore */ /** @todo return some indicator if we fail here */
 #else
@@ -1258,4 +1259,5 @@
 #if defined(VBOX_VMM_TARGET_ARMV8)
     /** @todo NEM: MMIO page aliasing. */
+    RT_NOREF(pVM, hRegion);
     return VINF_SUCCESS;    /* ignore */ /** @todo return some indicator if we fail here */
 #else
Index: /trunk/src/VBox/VMM/VMMAll/PDMAll.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PDMAll.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/PDMAll.cpp	(revision 100108)
@@ -150,5 +150,5 @@
 #ifdef VBOX_VMM_TARGET_ARMV8
     int rc = VINF_SUCCESS;
-    GICSpiSet(pVM, u8Level, u8Level == PDM_IRQ_LEVEL_HIGH ? true : false);
+    GICSpiSet(pVM, u8Irq, u8Level == PDM_IRQ_LEVEL_HIGH ? true : false);
 #else
     int rc = VERR_PDM_NO_PIC_INSTANCE;
Index: /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMAll/PGMAllPool.cpp	(revision 100108)
@@ -2164,5 +2164,7 @@
 static int pgmPoolCacheFreeOne(PPGMPOOL pPool, uint16_t iUser)
 {
+#ifndef VBOX_VMM_TARGET_ARMV8
     const PVMCC pVM = pPool->CTX_SUFF(pVM);
+#endif
     Assert(pPool->iAgeHead != pPool->iAgeTail); /* We shouldn't be here if there < 2 cached entries! */
     STAM_COUNTER_INC(&pPool->StatCacheFreeUpOne);
Index: /trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/DBGFDisas.cpp	(revision 100108)
@@ -383,5 +383,5 @@
 
 #if defined(VBOX_VMM_TARGET_ARMV8)
-    RT_NOREF(pVM, Sel, GCPtr, rc, fFlags, pszOutput, cbOutput, pcbInstr, pDisState);
+    RT_NOREF(pVM, pVCpu, Sel, GCPtr, rc, fFlags, pszOutput, cbOutput, pcbInstr, pDisState);
     AssertReleaseFailed(); /** @todo */
     return VERR_NOT_IMPLEMENTED;
Index: /trunk/src/VBox/VMM/VMMR3/GICR3.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/GICR3.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/GICR3.cpp	(revision 100108)
@@ -210,4 +210,5 @@
                                STAMUNIT_TICKS_PER_CALL, a_pszDesc, a_pszNameFmt, idCpu)
 
+#ifdef VBOX_WITH_STATISTICS
     for (VMCPUID idCpu = 0; idCpu < pVM->cCpus; idCpu++)
     {
@@ -215,5 +216,4 @@
         PGICCPU pGicCpu  = VMCPU_TO_GICCPU(pVCpu);
 
-#ifdef VBOX_WITH_STATISTICS
 # if 0 /* No R0 for now. */
         GIC_REG_COUNTER(&pGicCpu->StatMmioReadRZ,    "%u/RZ/MmioRead",    "Number of APIC MMIO reads in RZ.");
@@ -227,6 +227,6 @@
         GIC_REG_COUNTER(&pGicCpu->StatSysRegReadR3,  "%u/R3/SysRegRead",  "Number of GIC system register reads in R3.");
         GIC_REG_COUNTER(&pGicCpu->StatSysRegWriteR3, "%u/R3/SysRegWrite", "Number of GIC system register writes in R3.");
+    }
 #endif
-    }
 
 # undef GIC_PROF_COUNTER
Index: /trunk/src/VBox/VMM/VMMR3/GIM.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/GIM.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/GIM.cpp	(revision 100108)
@@ -350,4 +350,8 @@
 static DECLCALLBACK(int) gimR3LoadDone(PVM pVM, PSSMHANDLE pSSM)
 {
+#if defined(VBOX_VMM_TARGET_ARMV8)
+    RT_NOREF(pSSM);
+#endif
+
     switch (pVM->gim.s.enmProviderId)
     {
@@ -399,4 +403,8 @@
 VMMR3_INT_DECL(void) GIMR3Relocate(PVM pVM, RTGCINTPTR offDelta)
 {
+#if defined(VBOX_VMM_TARGET_ARMV8)
+    RT_NOREF(offDelta);
+#endif
+
     switch (pVM->gim.s.enmProviderId)
     {
Index: /trunk/src/VBox/VMM/VMMR3/HM-armv8.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/HM-armv8.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/HM-armv8.cpp	(revision 100108)
@@ -539,4 +539,5 @@
 {
     Assert(pVM->bMainExecutionEngine != VM_EXEC_ENGINE_NOT_SET);
-    return false;
-}
+    RT_NOREF(pVM);
+    return false;
+}
Index: /trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/NEMR3Native-darwin-armv8.cpp	(revision 100108)
@@ -889,4 +889,5 @@
                  fIsv, fL2Fault, fWrite, f64BitReg, fSignExtend, uReg, uAcc, GCPtrDataAbrt, GCPhysDataAbrt));
 
+    RT_NOREF(fL2Fault, GCPtrDataAbrt);
     AssertReturn(fIsv, VERR_NOT_SUPPORTED); /** @todo Implement using IEM when this should occur. */
 
Index: /trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/PDMAsyncCompletionFile.cpp	(revision 100108)
@@ -420,5 +420,9 @@
         pdmacFileEpAddTask(pEpFile, pIoTask);
         off        += paSegments[i].cbSeg;
+#ifdef RT_STRICT
         cbTransfer -= paSegments[i].cbSeg;
+#else
+        RT_NOREF(cbTransfer);
+#endif
     }
 
Index: /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDevHlp.cpp	(revision 100108)
@@ -1237,4 +1237,5 @@
     uint64_t u64Fsb = 0;
     AssertReleaseFailed();
+    RT_NOREF(pDevIns);
 #else
     uint64_t u64Fsb = CPUMGetGuestScalableBusFrequency(pDevIns->Internal.s.pVMR3);
@@ -4637,4 +4638,5 @@
 #ifdef VBOX_VMM_TARGET_ARMV8
     AssertReleaseFailed();
+    RT_NOREF(pDevIns, fEnable);
 #else
     PGMR3PhysSetA20(VMMGetCpu(pDevIns->Internal.s.pVMR3), fEnable);
@@ -4655,5 +4657,5 @@
 
 #ifdef VBOX_VMM_TARGET_ARMV8
-    RT_NOREF(iLeaf, pEax, pEbx, pEcx, pEdx);
+    RT_NOREF(pDevIns, iLeaf, pEax, pEbx, pEcx, pEdx);
     AssertReleaseFailed();
 #else
Index: /trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/PDMDevMiscHlp.cpp	(revision 100108)
@@ -63,5 +63,4 @@
     PDMDEV_ASSERT_DEVINS(pDevIns);
     PVM    pVM = pDevIns->Internal.s.pVMR3;
-    PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, SMP uses APIC */
 
     /* IRQ state should be loaded as-is by "LoadExec". Changes can be made from LoadDone. */
@@ -70,5 +69,7 @@
 #if defined(VBOX_VMM_TARGET_ARMV8)
     AssertReleaseFailed();
+    RT_NOREF(pVM);
 #else
+    PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, SMP uses APIC */
     APICLocalInterrupt(pVCpu, 0 /* u8Pin */, 1 /* u8Level */, VINF_SUCCESS /* rcRZ */);
 #endif
@@ -81,5 +82,4 @@
     PDMDEV_ASSERT_DEVINS(pDevIns);
     PVM pVM = pDevIns->Internal.s.pVMR3;
-    PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, SMP uses APIC */
 
     /* IRQ state should be loaded as-is by "LoadExec". Changes can be made from LoadDone. */
@@ -88,5 +88,7 @@
 #if defined(VBOX_VMM_TARGET_ARMV8)
     AssertReleaseFailed();
+    RT_NOREF(pVM);
 #else
+    PVMCPU pVCpu = pVM->apCpusR3[0];  /* for PIC we always deliver to CPU 0, SMP uses APIC */
     APICLocalInterrupt(pVCpu, 0 /* u8Pin */,  0 /* u8Level */, VINF_SUCCESS /* rcRZ */);
 #endif
@@ -136,11 +138,12 @@
 {
     PDMDEV_ASSERT_DEVINS(pDevIns);
-    PVM pVM = pDevIns->Internal.s.pVMR3;
     LogFlow(("pdmR3IoApicHlp_ApicBusDeliver: caller='%s'/%d: u8Dest=%RX8 u8DestMode=%RX8 u8DeliveryMode=%RX8 uVector=%RX8 u8Polarity=%RX8 u8TriggerMode=%RX8 uTagSrc=%#x\n",
              pDevIns->pReg->szName, pDevIns->iInstance, u8Dest, u8DestMode, u8DeliveryMode, uVector, u8Polarity, u8TriggerMode, uTagSrc));
 #if defined(VBOX_VMM_TARGET_ARMV8)
     AssertReleaseFailed();
+    RT_NOREF(pDevIns, u8Dest, u8DestMode, u8DeliveryMode, uVector, u8Polarity, u8TriggerMode, uTagSrc);
     return VERR_NOT_IMPLEMENTED;
 #else
+    PVM pVM = pDevIns->Internal.s.pVMR3;
     return APICBusDeliver(pVM, u8Dest, u8DestMode, u8DeliveryMode, uVector, u8Polarity, u8TriggerMode, uTagSrc);
 #endif
Index: /trunk/src/VBox/VMM/VMMR3/PGM-armv8.cpp
===================================================================
--- /trunk/src/VBox/VMM/VMMR3/PGM-armv8.cpp	(revision 100107)
+++ /trunk/src/VBox/VMM/VMMR3/PGM-armv8.cpp	(revision 100108)
@@ -714,4 +714,5 @@
 
     LogFlow(("PGMGstModifyPage %RGv %d bytes fFlags=%08llx fMask=%08llx\n", GCPtr, cb, fFlags, fMask));
+    RT_NOREF(pVCpu, GCPtr, cb, fFlags, fMask);
 
     AssertReleaseFailed();
Index: /trunk/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp
===================================================================
--- /trunk/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp	(revision 100107)
+++ /trunk/src/VBox/ValidationKit/testboxscript/TestBoxHelper.cpp	(revision 100108)
@@ -513,8 +513,8 @@
 {
     NOREF(argc); NOREF(argv);
+    int         fSupported = -1;
+
+#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     HWVIRTTYPE  enmHwVirt  = isHwVirtSupported();
-    int         fSupported = -1;
-
-#if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     if (enmHwVirt == HWVIRTTYPE_AMDV)
     {
