Преглед изворни кода

Fixes all compile errors about unused variables in MSVC 143 latest (#19124)

* Fixes all compile errors about unused variables in MSVC 143 latest

Also fixes errors found in clang19, but, msvc-clang19 has issues
with the Physx5 library, out of scope for fixing here.

Signed-off-by: Nicholas Lawson <[email protected]>

* Fix incorrect addition of spaces.

Signed-off-by: Nicholas Lawson <[email protected]>

---------

Signed-off-by: Nicholas Lawson <[email protected]>
Nicholas Lawson пре 3 недеља
родитељ
комит
331741ead1
76 измењених фајлова са 102 додато и 100 уклоњено
  1. 1 1
      Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp
  2. 1 1
      Code/Editor/CryEdit.cpp
  3. 1 1
      Code/Framework/AzCore/AzCore/Instance/InstancePool.h
  4. 2 2
      Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp
  5. 1 1
      Code/Framework/AzCore/Tests/Script.cpp
  6. 1 1
      Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp
  7. 1 1
      Code/Framework/AzFramework/AzFramework/Archive/ArchiveBus.h
  8. 5 5
      Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableMonitor.cpp
  9. 2 2
      Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.cpp
  10. 1 1
      Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.h
  11. 1 1
      Code/Framework/AzToolsFramework/AzToolsFramework/ActionManager/Action/ActionManagerNotificationBus.h
  12. 1 1
      Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp
  13. 1 1
      Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp
  14. 1 1
      Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp
  15. 1 1
      Code/Framework/AzToolsFramework/Tests/SliceUpgradeTestsData.h
  16. 1 1
      Code/Legacy/CrySystem/XML/XMLBinaryNode.h
  17. 2 2
      Code/Tools/AssetProcessor/native/AssetManager/AssetRequestHandler.cpp
  18. 1 1
      Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp
  19. 1 1
      Code/Tools/AssetProcessor/native/tests/AssetProcessorMessagesTests.cpp
  20. 1 1
      Code/Tools/AssetProcessor/native/tests/UnitTestUtilities.cpp
  21. 4 4
      Code/Tools/AssetProcessor/native/tests/assetmanager/AssetManagerTestingBase.cpp
  22. 1 1
      Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp
  23. 3 3
      Code/Tools/AssetProcessor/native/tests/assetmanager/MockAssetProcessorManager.cpp
  24. 2 2
      Code/Tools/AssetProcessor/native/tests/assetmanager/MockFileProcessor.cpp
  25. 1 1
      Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCControllerTest.cpp
  26. 1 1
      Code/Tools/AssetProcessor/native/ui/ProductAssetDetailsPanel.cpp
  27. 1 1
      Code/Tools/AssetProcessor/native/unittests/AssetRequestHandlerUnitTests.cpp
  28. 1 1
      Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp
  29. 2 2
      Code/Tools/AssetProcessor/native/utilities/AssetUtilEBusHelper.h
  30. 1 1
      Code/Tools/AssetProcessor/native/utilities/BatchApplicationManager.cpp
  31. 1 1
      Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp
  32. 1 1
      Code/Tools/CrashHandler/Support/platform/Windows/crash_handler_support_windows_files.cmake
  33. 1 1
      Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ISPCTextureCompressor.cpp
  34. 1 1
      Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp
  35. 1 1
      Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp
  36. 1 1
      Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp
  37. 1 1
      Gems/Atom/RHI/Code/Tests/Device.h
  38. 1 1
      Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp
  39. 2 2
      Gems/Atom/RPI/Code/Include/Atom/RPI.Public/SceneBus.h
  40. 1 1
      Gems/Atom/RPI/Code/Tests/Common/RHI/Stubs.h
  41. 1 1
      Gems/Atom/RPI/Code/Tests/Common/TestFeatureProcessors.h
  42. 1 1
      Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp
  43. 1 1
      Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/Decals/DecalBus.h
  44. 1 1
      Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentSlot.cpp
  45. 1 1
      Gems/DiffuseProbeGrid/Code/Source/Components/DiffuseProbeGridComponentController.cpp
  46. 1 1
      Gems/DiffuseProbeGrid/Code/Source/Render/DiffuseProbeGridFeatureProcessor.cpp
  47. 1 1
      Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/FileManager.cpp
  48. 1 1
      Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp
  49. 1 1
      Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp
  50. 1 1
      Gems/EditorPythonBindings/Code/Tests/PythonGlobalsTests.cpp
  51. 2 2
      Gems/GameState/Code/Include/GameState/GameStateNotificationBus.h
  52. 1 1
      Gems/GameStateSamples/Code/Include/GameStateSamples/GameStatePrimaryUserMonitor.inl
  53. 2 2
      Gems/GraphModel/Code/Include/GraphModel/GraphModelBus.h
  54. 1 1
      Gems/GraphModel/Code/Include/GraphModel/Integration/EditorMainWindow.h
  55. 1 1
      Gems/GraphModel/Code/Source/Model/Module/ModuleGraphManager.cpp
  56. 1 1
      Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp
  57. 1 1
      Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h
  58. 2 2
      Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h
  59. 1 1
      Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h
  60. 1 1
      Gems/LyShine/Code/Tests/AnimationTest.cpp
  61. 3 1
      Gems/MessagePopup/Code/Source/LyShineMessagePopup.cpp
  62. 1 1
      Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp
  63. 1 1
      Gems/PhysX/Core/Code/Source/HeightfieldColliderComponent.cpp
  64. 3 3
      Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp
  65. 1 1
      Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverNodeDescriptorComponent.cpp
  66. 1 1
      Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventSenderNodeDescriptorComponent.cpp
  67. 1 1
      Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp
  68. 1 1
      Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp
  69. 1 1
      Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp
  70. 2 2
      Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.cpp
  71. 2 2
      Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLuaUtility.cpp
  72. 1 1
      Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAssetRef.h
  73. 1 1
      Gems/ScriptEvents/Code/Source/Editor/ScriptEventsSystemEditorComponent.cpp
  74. 1 1
      Gems/ScriptEvents/Code/Source/ScriptEventsAssetRef.cpp
  75. 3 3
      Gems/ScriptEvents/Code/Tests/Tests/ScriptEventsTest_Core.cpp
  76. 1 1
      Gems/Vegetation/Code/Tests/PrefabInstanceSpawnerTests.cpp

+ 1 - 1
Code/Editor/AssetImporter/AssetImporterManager/AssetImporterManager.cpp

@@ -540,7 +540,7 @@ void AssetImporterManager::ProcessMoveFiles()
     }
 }
 
-bool AssetImporterManager::Copy(QString relativePath, QString oldAbsolutePath, QString destinationAbsolutePath)
+bool AssetImporterManager::Copy([[maybe_unused]] QString relativePath, QString oldAbsolutePath, QString destinationAbsolutePath)
 {
     QString fileName = GetFileName(destinationAbsolutePath);
     QString subPath = QFileInfo(destinationAbsolutePath).absoluteDir().absolutePath();

+ 1 - 1
Code/Editor/CryEdit.cpp

@@ -1765,7 +1765,7 @@ bool CCryEditApp::InitInstance()
 }
 
 //////////////////////////////////////////////////////////////////////////
-void CCryEditApp::LoadFile(QString fileName)
+void CCryEditApp::LoadFile([[maybe_unused]] QString fileName)
 {
     if (GetIEditor()->GetViewManager()->GetViewCount() == 0)
     {

+ 1 - 1
Code/Framework/AzCore/AzCore/Instance/InstancePool.h

@@ -150,7 +150,7 @@ namespace AZ
             typename InstancePool<T>::ResetInstance resetFunc = [](T&){}, 
             typename InstancePool<T>::CreateInstance createFunc = []() { return new T{}; })
         {
-            return CreatePool<T>(GetDefaultName<T>(), resetFunc);
+            return CreatePool<T>(GetDefaultName<T>(), resetFunc, createFunc);
         }
 
         // returns the pool with the specified name

+ 2 - 2
Code/Framework/AzCore/Tests/Asset/AssetManagerLoadingTests.cpp

@@ -3350,7 +3350,7 @@ namespace UnitTest
                 BusDisconnect();
             }
 
-            void OnAssetReady(Asset<AssetData> asset) override
+            void OnAssetReady([[maybe_unused]] Asset<AssetData> asset) override
             {
                 m_loadSignal->release();
             }
@@ -3542,7 +3542,7 @@ namespace UnitTest
                 BusDisconnect();
             }
 
-            void OnAssetReady(Asset<AssetData> asset) override
+            void OnAssetReady([[maybe_unused]] Asset<AssetData> asset) override
             {
                 ColoredPrintf(COLOR_YELLOW, "ThreadA: OnAssetReady called \n");
                 m_onAssetReadySignal.release();

+ 1 - 1
Code/Framework/AzCore/Tests/Script.cpp

@@ -326,7 +326,7 @@ namespace UnitTest
 
         virtual void OnEventConst() const {};
 
-        virtual BehaviorTestClass OnEventResultWithBehaviorClassParameter(BehaviorTestClass data) { return BehaviorTestClass(); };
+        virtual BehaviorTestClass OnEventResultWithBehaviorClassParameter([[maybe_unused]] BehaviorTestClass data) { return BehaviorTestClass(); };
     };
 
     typedef AZ::EBus<BehaviorTestBusEvents> BehaviorTestBus;

+ 1 - 1
Code/Framework/AzFramework/AzFramework/Archive/Archive.cpp

@@ -1536,7 +1536,7 @@ namespace AZ::IO
     //////////////////////////////////////////////////////////////////////////
     // open the physical archive file - creates if it doesn't exist
     // returns nullptr if it's invalid or can't open the file
-    AZStd::intrusive_ptr<INestedArchive> Archive::OpenArchive(AZStd::string_view szPath, AZStd::string_view bindRoot, uint32_t nFlags, AZStd::intrusive_ptr<AZ::IO::MemoryBlock> pData)
+    AZStd::intrusive_ptr<INestedArchive> Archive::OpenArchive(AZStd::string_view szPath, AZStd::string_view bindRoot, uint32_t nFlags,[[maybe_unused]] AZStd::intrusive_ptr<AZ::IO::MemoryBlock> pData)
     {
         auto szFullPath = AZ::IO::FileIOBase::GetDirectInstance()->ResolvePath(szPath);
         if (!szFullPath)

+ 1 - 1
Code/Framework/AzFramework/AzFramework/Archive/ArchiveBus.h

@@ -26,7 +26,7 @@ namespace AZ::IO
         static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Multiple;
         static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single;
 
-        virtual void BundleOpened([[maybe_unused]] const char* bundleName, AZStd::shared_ptr<AzFramework::AssetBundleManifest> bundleManifest, [[maybe_unused]] const char* nextBundle, AZStd::shared_ptr<AzFramework::AssetRegistry> bundleCatalog) {}
+        virtual void BundleOpened([[maybe_unused]] const char* bundleName, [[maybe_unused]] AZStd::shared_ptr<AzFramework::AssetBundleManifest> bundleManifest, [[maybe_unused]] const char* nextBundle, [[maybe_unused]] AZStd::shared_ptr<AzFramework::AssetRegistry> bundleCatalog) {}
         virtual void BundleClosed([[maybe_unused]] const char* bundleName) {}
 
         // Sent when a file is accessed through Archive

+ 5 - 5
Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableMonitor.cpp

@@ -90,7 +90,7 @@ namespace AzFramework
         }
     }
 
-    void SpawnableMonitor::OnAssetReady(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void SpawnableMonitor::OnAssetReady([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         AZ_Assert(!m_isLoaded, "Trying to load spawnable %s (%s) for a second time.",
             asset.GetHint().c_str(), asset.GetId().ToString<AZStd::string>().c_str());
@@ -98,7 +98,7 @@ namespace AzFramework
         OnSpawnableLoaded();
     }
 
-    void SpawnableMonitor::OnAssetReloaded(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void SpawnableMonitor::OnAssetReloaded([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         AZ_Assert(m_isLoaded, "Trying to reload a spawnable %s (%s) that wasn't loaded.",
             asset.GetHint().c_str(), asset.GetId().ToString<AZStd::string>().c_str());
@@ -113,7 +113,7 @@ namespace AzFramework
         OnSpawnableUnloaded();
     }
 
-    void SpawnableMonitor::OnAssetError(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void SpawnableMonitor::OnAssetError([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         if (m_isLoaded)
         {
@@ -126,7 +126,7 @@ namespace AzFramework
         OnSpawnableIssue(IssueType::Error, message);
     }
 
-    void SpawnableMonitor::OnAssetCanceled(AZ::Data::AssetId assetId)
+    void SpawnableMonitor::OnAssetCanceled([[maybe_unused]] AZ::Data::AssetId assetId)
     {
         if (m_isLoaded)
         {
@@ -139,7 +139,7 @@ namespace AzFramework
         OnSpawnableIssue(IssueType::Cancel, message);
     }
 
-    void SpawnableMonitor::OnAssetReloadError(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void SpawnableMonitor::OnAssetReloadError([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         if (m_isLoaded)
         {

+ 2 - 2
Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.cpp

@@ -38,7 +38,7 @@ namespace AzQtComponents
     QSharedPointer<PaletteCard> PaletteCardCollection::makeCard(QSharedPointer<Palette> palette, const QString& title)
     {
         auto card = QSharedPointer<PaletteCard>::create(palette, m_colorController, m_undoStack, this);
-        card->setTitle(uniquePaletteName(card, title));
+        card->setTitle(uniquePaletteName(title));
         card->setSwatchSize(m_swatchSize);
         card->setGammaEnabled(m_gammaEnabled);
         card->setGamma(m_gamma);
@@ -206,7 +206,7 @@ namespace AzQtComponents
         }
     }
 
-    QString PaletteCardCollection::uniquePaletteName(QSharedPointer<PaletteCard> card, const QString& name) const
+    QString PaletteCardCollection::uniquePaletteName(const QString& name) const
     {
         const auto paletteNameExists = [this](const QString& name)
         {

+ 1 - 1
Code/Framework/AzQtComponents/AzQtComponents/Components/Widgets/ColorPicker/PaletteCardCollection.h

@@ -66,7 +66,7 @@ namespace AzQtComponents
         void paletteCountChanged();
 
     private:
-        QString uniquePaletteName(QSharedPointer<PaletteCard> card, const QString& name) const;
+        QString uniquePaletteName(const QString& name) const;
         void paletteCardDestroyed(QObject* obj);
 
         Internal::ColorController* m_colorController;

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/ActionManager/Action/ActionManagerNotificationBus.h

@@ -23,7 +23,7 @@ namespace AzToolsFramework
         //////////////////////////////////////////////////////////////////////////
 
         //! Triggered when an action's enabled or checked state changes.
-        virtual void OnActionStateChanged(AZStd::string actionIdentifier) {}
+        virtual void OnActionStateChanged([[maybe_unused]] AZStd::string actionIdentifier) {}
 
     protected:
         ~ActionManagerNotifications() = default;

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/ComponentMode/EditorBaseComponentMode.cpp

@@ -27,7 +27,7 @@ namespace AzToolsFramework
             const AZ::EntityId entityId = entityComponentIdPair.GetEntityId();
             AZ_Assert(entityId.IsValid(), "Attempting to create a Component Mode with an invalid EntityId");
 
-            if (const AZ::Entity* entity = AzToolsFramework::GetEntity(entityId))
+            if ([[maybe_unused]] const AZ::Entity* entity = AzToolsFramework::GetEntity(entityId))
             {
                 AZ_Assert(entity->GetState() == AZ::Entity::State::Active,
                     "Attempting to create a Component Mode for an Entity which is not currently active. "

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/Slice/SliceUtilities.cpp

@@ -1029,7 +1029,7 @@ namespace AzToolsFramework
         }
 
         //=========================================================================
-        SliceTransaction::Result SlicePreSaveCallbackForWorldEntities(SliceTransaction::TransactionPtr transaction, const char* fullPath, SliceTransaction::SliceAssetPtr& asset)
+        SliceTransaction::Result SlicePreSaveCallbackForWorldEntities([[maybe_unused]] SliceTransaction::TransactionPtr transaction, const char* fullPath, SliceTransaction::SliceAssetPtr& asset)
         {
             AZ_PROFILE_SCOPE(AzToolsFramework, "SliceUtilities::SlicePreSaveCallbackForWorldEntities");
 

+ 1 - 1
Code/Framework/AzToolsFramework/AzToolsFramework/UI/LegacyFramework/Core/EditorFrameworkApplication.cpp

@@ -276,7 +276,7 @@ namespace LegacyFramework
         if (m_applicationEntity)
         {
             // if the component already exists on the system entity, this is an error.
-            if (auto comp = m_ptrSystemEntity->FindComponent(componentCRC))
+            if ([[maybe_unused]] auto comp = m_ptrSystemEntity->FindComponent(componentCRC))
             {
                 AZ_Warning("EditorFramework", 0, "Attempt to add a component that already exists on the system entity: %s\n", comp->RTTI_GetTypeName());
                 return true;

+ 1 - 1
Code/Framework/AzToolsFramework/Tests/SliceUpgradeTestsData.h

@@ -131,7 +131,7 @@ namespace UnitTest
                 serializeContext->Class<TestComponentA_V1, AzToolsFramework::Components::EditorComponentBase>()
                     ->Version(1)
                     ->Field("NewData", &TestComponentA_V1::m_data)
-                    ->TypeChange<TestDataA, NewTestDataA>("Data", 0, 1, [](TestDataA in) -> NewTestDataA {
+                    ->TypeChange<TestDataA, NewTestDataA>("Data", 0, 1, [](TestDataA) -> NewTestDataA {
                         return NewTestDataA();
                     })
                     ->NameChange(0, 1, "Data", "NewData")

+ 1 - 1
Code/Legacy/CrySystem/XML/XMLBinaryNode.h

@@ -91,7 +91,7 @@ public:
     virtual bool getAttributeByIndex(int index, XmlString& key, XmlString& value);
 
 
-    void copyAttributes(XmlNodeRef fromNode) override { assert(0); };
+    void copyAttributes(XmlNodeRef) override { assert(0); };
 
     //! Get XML Node attribute for specified key.
     const char* getAttr(const char* key) const override;

+ 2 - 2
Code/Tools/AssetProcessor/native/AssetManager/AssetRequestHandler.cpp

@@ -290,7 +290,7 @@ namespace
         return response;
     }
 
-    GetScanFoldersResponse HandleGetScanFoldersRequest(MessageData<GetScanFoldersRequest> messageData)
+    GetScanFoldersResponse HandleGetScanFoldersRequest([[maybe_unused]] MessageData<GetScanFoldersRequest> messageData)
     {
         bool success = true;
         AZStd::vector<AZStd::string> scanFolders;
@@ -305,7 +305,7 @@ namespace
         return GetScanFoldersResponse(move(scanFolders));
     }
 
-    GetAssetSafeFoldersResponse HandleGetAssetSafeFoldersRequest(MessageData<GetAssetSafeFoldersRequest> messageData)
+    GetAssetSafeFoldersResponse HandleGetAssetSafeFoldersRequest([[maybe_unused]] MessageData<GetAssetSafeFoldersRequest> messageData)
     {
         bool success = true;
         AZStd::vector<AZStd::string> assetSafeFolders;

+ 1 - 1
Code/Tools/AssetProcessor/native/AssetManager/assetProcessorManager.cpp

@@ -350,7 +350,7 @@ namespace AssetProcessor
     }
 
     //! A network request came in, Given a Job Run Key (from the above Job Request), asking for the actual log for that job.
-    GetAbsoluteAssetDatabaseLocationResponse AssetProcessorManager::ProcessGetAbsoluteAssetDatabaseLocationRequest(MessageData<GetAbsoluteAssetDatabaseLocationRequest> messageData)
+    GetAbsoluteAssetDatabaseLocationResponse AssetProcessorManager::ProcessGetAbsoluteAssetDatabaseLocationRequest([[maybe_unused]] MessageData<GetAbsoluteAssetDatabaseLocationRequest> messageData)
     {
         GetAbsoluteAssetDatabaseLocationResponse response;
 

+ 1 - 1
Code/Tools/AssetProcessor/native/tests/AssetProcessorMessagesTests.cpp

@@ -164,7 +164,7 @@ namespace AssetProcessorMessagesTests
             m_batchApplicationManager->InitAssetRequestHandler(m_assetRequestHandler);
             m_batchApplicationManager->ConnectAssetCatalog();
 
-            QObject::connect(m_batchApplicationManager->m_connectionManager, &ConnectionManager::ConnectionError, [](unsigned /*connId*/, QString error)
+            QObject::connect(m_batchApplicationManager->m_connectionManager, &ConnectionManager::ConnectionError, [](unsigned /*connId*/, [[maybe_unused]] QString error)
                 {
                     AZ_Error("ConnectionManager", false, "%s", error.toUtf8().constData());
                 });

+ 1 - 1
Code/Tools/AssetProcessor/native/tests/UnitTestUtilities.cpp

@@ -166,7 +166,7 @@ namespace UnitTests
     }
 
     void MockMultiBuilderInfoHandler::ProcessJob(
-        AssetBuilderExtraInfo extraInfo,
+        [[maybe_unused]] AssetBuilderExtraInfo extraInfo,
         [[maybe_unused]] const AssetBuilderSDK::ProcessJobRequest& request,
         AssetBuilderSDK::ProcessJobResponse& response)
     {

+ 4 - 4
Code/Tools/AssetProcessor/native/tests/assetmanager/AssetManagerTestingBase.cpp

@@ -161,7 +161,7 @@ namespace UnitTests
         QObject::connect(
             m_rc.get(),
             &AssetProcessor::RCController::FileFailed,
-            [this](auto entryIn)
+            [this]([[maybe_unused]] auto entryIn)
             {
                 m_fileFailed = true;
             });
@@ -228,7 +228,7 @@ namespace UnitTests
         QObject::connect(
             m_assetProcessorManager.get(),
             &AssetProcessor::AssetProcessorManager::ProcessingDelayed,
-            [&delayed](QString filePath)
+            [&delayed](QString)
             {
                 delayed = true;
             });
@@ -236,7 +236,7 @@ namespace UnitTests
         QObject::connect(
             m_assetProcessorManager.get(),
             &AssetProcessor::AssetProcessorManager::ProcessingResumed,
-            [&delayed](QString filePath)
+            [&delayed](QString)
             {
                 delayed = false;
             });
@@ -420,7 +420,7 @@ namespace UnitTests
         QObject::connect(
             m_rc.get(),
             &AssetProcessor::RCController::FileCompiled,
-            [this](AssetProcessor::JobEntry entry, AssetBuilderSDK::ProcessJobResponse response)
+            [this](AssetProcessor::JobEntry entry, [[maybe_unused]] AssetBuilderSDK::ProcessJobResponse response)
             {
                 QMetaObject::invokeMethod(m_rc.get(), "OnAddedToCatalog", Qt::QueuedConnection, Q_ARG(AssetProcessor::JobEntry, entry));
             });

+ 1 - 1
Code/Tools/AssetProcessor/native/tests/assetmanager/AssetProcessorManagerTest.cpp

@@ -5621,7 +5621,7 @@ TEST_F(ChainJobDependencyTest, TestChainDependency_Multi)
 
     // Wait for the file compiled event and trigger OnAddedToCatalog with a delay, this is what causes rccontroller to process out of order
     AZStd::vector<JobEntry> finishedJobs;
-    QObject::connect(m_data->m_rcController.get(), &RCController::FileCompiled, [this, &finishedJobs](JobEntry entry, AssetBuilderSDK::ProcessJobResponse response)
+    QObject::connect(m_data->m_rcController.get(), &RCController::FileCompiled, [this, &finishedJobs](JobEntry entry,[[maybe_unused]]  AssetBuilderSDK::ProcessJobResponse response)
         {
             finishedJobs.push_back(entry);
 

+ 3 - 3
Code/Tools/AssetProcessor/native/tests/assetmanager/MockAssetProcessorManager.cpp

@@ -10,17 +10,17 @@
 
 namespace UnitTests
 {
-    void MockAssetProcessorManager::AssessAddedFile(QString filePath)
+    void MockAssetProcessorManager::AssessAddedFile([[maybe_unused]] QString filePath)
     {
         m_events[TestEvents::Added].Signal();
     }
 
-    void MockAssetProcessorManager::AssessModifiedFile(QString filePath)
+    void MockAssetProcessorManager::AssessModifiedFile([[maybe_unused]] QString filePath)
     {
         m_events[TestEvents::Modified].Signal();
     }
 
-    void MockAssetProcessorManager::AssessDeletedFile(QString filePath)
+    void MockAssetProcessorManager::AssessDeletedFile([[maybe_unused]] QString filePath)
     {
         m_events[TestEvents::Deleted].Signal();
     }

+ 2 - 2
Code/Tools/AssetProcessor/native/tests/assetmanager/MockFileProcessor.cpp

@@ -10,12 +10,12 @@
 
 namespace UnitTests
 {
-     void MockFileProcessor::AssessAddedFile(QString fileName)
+    void MockFileProcessor::AssessAddedFile([[maybe_unused]] QString fileName)
     {
         m_events[TestEvents::Added].Signal();
     }
 
-     void MockFileProcessor::AssessDeletedFile(QString fileName)
+     void MockFileProcessor::AssessDeletedFile([[maybe_unused]] QString fileName)
     {
         m_events[TestEvents::Deleted].Signal();
     }

+ 1 - 1
Code/Tools/AssetProcessor/native/tests/resourcecompiler/RCControllerTest.cpp

@@ -222,7 +222,7 @@ TEST_F(RCcontrollerTest_Simple, DISABLED_SameJobIsCompletedMultipleTimes_Complet
     using namespace AssetProcessor;
 
     AZStd::vector<JobEntry> jobEntries;
-    QObject::connect(m_rcController.get(), &RCController::FileCompiled, [&jobEntries](JobEntry entry, AssetBuilderSDK::ProcessJobResponse response)
+    QObject::connect(m_rcController.get(), &RCController::FileCompiled, [&jobEntries](JobEntry entry, [[maybe_unused]] AssetBuilderSDK::ProcessJobResponse response)
     {
         jobEntries.push_back(entry);
     });

+ 1 - 1
Code/Tools/AssetProcessor/native/ui/ProductAssetDetailsPanel.cpp

@@ -261,7 +261,7 @@ namespace AssetProcessor
     }
 
     void ProductAssetDetailsPanel::BuildIncomingProductDependencies(
-        const AZStd::shared_ptr<const ProductAssetTreeItemData> productItemData,
+        [[maybe_unused]] const AZStd::shared_ptr<const ProductAssetTreeItemData> productItemData,
         const AZ::Data::AssetId& assetId,
         const AZStd::string& platform)
     {

+ 1 - 1
Code/Tools/AssetProcessor/native/unittests/AssetRequestHandlerUnitTests.cpp

@@ -66,7 +66,7 @@ namespace AssetProcessor
             m_fenceId = fenceId;
             return m_fenceFileName;
         }
-        bool DeleteFenceFile(QString fenceFileName) override
+        bool DeleteFenceFile([[maybe_unused]] QString fenceFileName) override
         {
             m_numTimesDeleteFenceFileCalled++;
             return m_deleteFenceFileResult;

+ 1 - 1
Code/Tools/AssetProcessor/native/unittests/RCcontrollerUnitTests.cpp

@@ -202,7 +202,7 @@ void RCcontrollerUnitTests::ConnectCompileGroupSignalsAndSlots(bool& gotCreated,
 
 void RCcontrollerUnitTests::ConnectJobSignalsAndSlots(bool& allJobsCompleted, JobEntry& completedJob)
 {
-    QObject::connect(m_rcController.get(), &RCController::FileCompiled, this, [&](JobEntry entry, AssetBuilderSDK::ProcessJobResponse response)
+    QObject::connect(m_rcController.get(), &RCController::FileCompiled, this, [&](JobEntry entry, [[maybe_unused]] AssetBuilderSDK::ProcessJobResponse response)
         {
             completedJob = entry;
         });

+ 2 - 2
Code/Tools/AssetProcessor/native/utilities/AssetUtilEBusHelper.h

@@ -39,9 +39,9 @@ public:
 
     virtual ~AssetProcessorPlaformBusTraits() {}
     //Informs that the AP got a connection for this platform.
-    virtual void AssetProcessorPlatformConnected(const AZStd::string platform) {}
+    virtual void AssetProcessorPlatformConnected([[maybe_unused]] const AZStd::string platform) {}
     //Informs that a connection got disconnected for this platform.
-    virtual void AssetProcessorPlatformDisconnected(const AZStd::string platform) {}
+    virtual void AssetProcessorPlatformDisconnected([[maybe_unused]] const AZStd::string platform) {}
 };
 
 using AssetProcessorPlatformBus = AZ::EBus<AssetProcessorPlaformBusTraits>;

+ 1 - 1
Code/Tools/AssetProcessor/native/utilities/BatchApplicationManager.cpp

@@ -96,7 +96,7 @@ const char* BatchApplicationManager::GetLogBaseName()
     return "AP_Batch";
 }
 
-ApplicationManager::RegistryCheckInstructions BatchApplicationManager::PopupRegistryProblemsMessage(QString warningText)
+ApplicationManager::RegistryCheckInstructions BatchApplicationManager::PopupRegistryProblemsMessage([[maybe_unused]] QString warningText)
 {
     return RegistryCheckInstructions::Exit;
 }

+ 1 - 1
Code/Tools/AssetProcessor/native/utilities/BuilderManager.cpp

@@ -66,7 +66,7 @@ namespace AssetProcessor
         }
     }
 
-    void BuilderManager::IncomingBuilderPing(AZ::u32 connId, AZ::u32 /*type*/, AZ::u32 serial, QByteArray payload, QString platform)
+    void BuilderManager::IncomingBuilderPing(AZ::u32 connId, AZ::u32 /*type*/, AZ::u32 serial, QByteArray payload,[[maybe_unused]]  QString platform)
     {
         AssetBuilder::BuilderHelloRequest requestPing;
         AssetBuilder::BuilderHelloResponse responsePing;

+ 1 - 1
Code/Tools/CrashHandler/Support/platform/Windows/crash_handler_support_windows_files.cmake

@@ -7,5 +7,5 @@
 #
 
 set(FILES
-    ../../Platform/win/CrashSupport_win.cpp
+    ../../platform/win/CrashSupport_win.cpp
 )

+ 1 - 1
Gems/Atom/Asset/ImageProcessingAtom/Code/Source/Compressors/ISPCTextureCompressor.cpp

@@ -248,7 +248,7 @@ namespace ImageProcessingAtom
         return destinationImage;
     }
 
-    IImageObjectPtr ISPCCompressor::DecompressImage(IImageObjectPtr sourceImage, [[maybe_unused]] EPixelFormat destinationFormat) const
+    IImageObjectPtr ISPCCompressor::DecompressImage([[maybe_unused]] IImageObjectPtr sourceImage, [[maybe_unused]] EPixelFormat destinationFormat) const
     {
         return nullptr;
     }

+ 1 - 1
Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp

@@ -1810,7 +1810,7 @@ namespace AZ
             OnAssetReady(asset);
         }
 
-        void ModelDataInstance::MeshLoader::OnAssetError(Data::Asset<Data::AssetData> asset)
+        void ModelDataInstance::MeshLoader::OnAssetError([[maybe_unused]] Data::Asset<Data::AssetData> asset)
         {
             // Note: m_modelAsset and asset represents same asset, but only m_modelAsset contains the file path in its hint from serialization
             AZ_Error(

+ 1 - 1
Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp

@@ -39,7 +39,7 @@ namespace AZ
             }
         }
 
-        void ReflectionProbe::OnAssetError(Data::Asset<Data::AssetData> asset)
+        void ReflectionProbe::OnAssetError([[maybe_unused]] Data::Asset<Data::AssetData> asset)
         {
             AZ_Error("ReflectionProbe", false, "Failed to load ReflectionProbe dependency asset %s", asset.ToString<AZStd::string>().c_str());
             Data::AssetBus::Handler::BusDisconnect();

+ 1 - 1
Gems/Atom/RHI/Code/Source/RHI/FrameGraph.cpp

@@ -118,7 +118,7 @@ namespace AZ::RHI
     }
 
     void FrameGraph::ValidateOverlappingAttachment(
-        AttachmentId attachmentId, ScopeAttachmentUsage usage, [[maybe_unused]] ScopeAttachmentAccess access, const ScopeAttachment& scopeAttachment) const
+        [[maybe_unused]] AttachmentId attachmentId, ScopeAttachmentUsage usage, [[maybe_unused]] ScopeAttachmentAccess access, const ScopeAttachment& scopeAttachment) const
     {
         // Validation for access type
         AZ_Assert(

+ 1 - 1
Gems/Atom/RHI/Code/Tests/Device.h

@@ -74,7 +74,7 @@ namespace UnitTest
 
         AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::BufferDescriptor& descriptor) { return AZ::RHI::ResourceMemoryRequirements{}; };
 
-        void ObjectCollectionNotify(AZ::RHI::ObjectCollectorNotifyFunction notifyFunction) override {}
+        void ObjectCollectionNotify([[maybe_unused]] AZ::RHI::ObjectCollectorNotifyFunction notifyFunction) override {}
 
         AZ::RHI::ShadingRateImageValue ConvertShadingRate([[maybe_unused]] AZ::RHI::ShadingRate rate) const override
         {

+ 1 - 1
Gems/Atom/RHI/DX12/Code/Source/RHI/RayTracingShaderTable.cpp

@@ -51,7 +51,7 @@ namespace AZ
                                                            const RHI::DeviceRayTracingBufferPools& bufferPools,
                                                            const RHI::DeviceRayTracingShaderTableRecordList& recordList,
                                                            uint32_t shaderRecordSize,
-                                                           AZStd::wstring shaderTableName,
+                                                            [[maybe_unused]] AZStd::wstring shaderTableName,
                                                            Microsoft::WRL::ComPtr<ID3D12StateObjectProperties>& stateObjectProperties)
         {
 

+ 2 - 2
Gems/Atom/RPI/Code/Include/Atom/RPI.Public/SceneBus.h

@@ -52,7 +52,7 @@ namespace AZ
             //! @deprecated use OnRenderPipelineChanged(RenderPipeline*, RenderPipelineChangeType::Added)
             //! Notifies when a render pipeline is added to this scene. 
             //! @param pipeline The render pipeline which was added
-            virtual void OnRenderPipelineAdded(RenderPipelinePtr pipeline) {};
+            virtual void OnRenderPipelineAdded([[maybe_unused]] RenderPipelinePtr pipeline) {};
                         
             //! O3DE_DEPRECATION_NOTICE(GHI-12687)
             //! @deprecated use OnRenderPipelineChanged(RenderPipeline*, RenderPipelineChangeType::PassChanged)
@@ -77,7 +77,7 @@ namespace AZ
             //! @param viewTag The viewTag in this render pipeline which the new view was set to
             //! @param newView The view which was set to the render pipeline's view tag
             //! @param previousView The previous view associates to render pipeline's view tag before the new view was set
-            virtual void OnRenderPipelinePersistentViewChanged([[maybe_unused]] RenderPipeline* renderPipeline, PipelineViewTag viewTag, ViewPtr newView, ViewPtr previousView) {}
+            virtual void OnRenderPipelinePersistentViewChanged([[maybe_unused]] RenderPipeline* renderPipeline, [[maybe_unused]] PipelineViewTag viewTag, [[maybe_unused]] ViewPtr newView, [[maybe_unused]] ViewPtr previousView) {}
 
             //! Notifies that the pipeline state lookup table has been rebuilt, so the pipeline state data (multisample state,
             //! render attachment configuration, etc) for a DrawListTag may have changed. 

+ 1 - 1
Gems/Atom/RPI/Code/Tests/Common/RHI/Stubs.h

@@ -75,7 +75,7 @@ namespace UnitTest
             void PreShutdown() override {}
             AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::ImageDescriptor& descriptor) override { return AZ::RHI::ResourceMemoryRequirements{}; };
             AZ::RHI::ResourceMemoryRequirements GetResourceMemoryRequirements([[maybe_unused]] const AZ::RHI::BufferDescriptor& descriptor) override { return AZ::RHI::ResourceMemoryRequirements{}; };
-            void ObjectCollectionNotify(AZ::RHI::ObjectCollectorNotifyFunction notifyFunction) override {}
+            void ObjectCollectionNotify([[maybe_unused]] AZ::RHI::ObjectCollectorNotifyFunction notifyFunction) override {}
             AZ::RHI::ShadingRateImageValue ConvertShadingRate([[maybe_unused]] AZ::RHI::ShadingRate rate) const override
             {
                 return AZ::RHI::ShadingRateImageValue{};

+ 1 - 1
Gems/Atom/RPI/Code/Tests/Common/TestFeatureProcessors.h

@@ -48,7 +48,7 @@ namespace UnitTest
         void Render(const RenderPacket&)  override {};
 
         // Overrides for scene notification bus handler
-        void OnRenderPipelinePersistentViewChanged(AZ::RPI::RenderPipeline* renderPipeline, AZ::RPI::PipelineViewTag viewTag, AZ::RPI::ViewPtr newView, AZ::RPI::ViewPtr previousView) override
+        void OnRenderPipelinePersistentViewChanged(AZ::RPI::RenderPipeline* renderPipeline, [[maybe_unused]] AZ::RPI::PipelineViewTag viewTag, [[maybe_unused]] AZ::RPI::ViewPtr newView,[[maybe_unused]]  AZ::RPI::ViewPtr previousView) override
         {
             m_viewSetCount++;
             m_lastPipeline = renderPipeline;

+ 1 - 1
Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp

@@ -151,7 +151,7 @@ namespace AZ::AtomBridge
     }
 
 
-    void AtomDebugDisplayViewportInterface::OnViewportDefaultViewChanged(AZ::RPI::ViewPtr view)
+    void AtomDebugDisplayViewportInterface::OnViewportDefaultViewChanged([[maybe_unused]] AZ::RPI::ViewPtr view)
     {
         ResetRenderState();
         if (!m_defaultInstance)

+ 1 - 1
Gems/AtomLyIntegration/CommonFeatures/Code/Include/AtomLyIntegration/CommonFeatures/Decals/DecalBus.h

@@ -105,7 +105,7 @@ namespace AZ
 
             //! Signals that the material has changed
             //! @param materialAsset The material asset of the decal
-            virtual void OnMaterialChanged(Data::Asset<RPI::MaterialAsset> materialAsset){ }
+            virtual void OnMaterialChanged([[maybe_unused]] Data::Asset<RPI::MaterialAsset> materialAsset){ }
         };
 
         /// The EBus for decal notification events.

+ 1 - 1
Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialComponentSlot.cpp

@@ -464,7 +464,7 @@ namespace AZ
             }
         }
 
-        void EditorMaterialComponentSlot::OnAssetReloaded(Data::Asset<Data::AssetData> asset)
+        void EditorMaterialComponentSlot::OnAssetReloaded([[maybe_unused]] Data::Asset<Data::AssetData> asset)
         {
             UpdatePreview();
         }

+ 1 - 1
Gems/DiffuseProbeGrid/Code/Source/Components/DiffuseProbeGridComponentController.cpp

@@ -204,7 +204,7 @@ namespace AZ
             m_boxChangedByGridEvent.Signal(true);
         }
 
-        void DiffuseProbeGridComponentController::OnAssetReady(Data::Asset<Data::AssetData> asset)
+        void DiffuseProbeGridComponentController::OnAssetReady([[maybe_unused]] Data::Asset<Data::AssetData> asset)
         {
             // if all assets are ready we can set the baked texture images
             if (m_configuration.m_bakedIrradianceTextureAsset.IsReady() &&

+ 1 - 1
Gems/DiffuseProbeGrid/Code/Source/Render/DiffuseProbeGridFeatureProcessor.cpp

@@ -859,7 +859,7 @@ namespace AZ
         }
 
         void DiffuseProbeGridFeatureProcessor::OnRenderPipelinePersistentViewChanged(
-            RPI::RenderPipeline* renderPipeline, RPI::PipelineViewTag viewTag, RPI::ViewPtr newView, RPI::ViewPtr previousView)
+            RPI::RenderPipeline* renderPipeline, RPI::PipelineViewTag viewTag, RPI::ViewPtr newView, [[maybe_unused]] RPI::ViewPtr previousView)
         {
             if (m_sceneAndViewShader)
             {

+ 1 - 1
Gems/EMotionFX/Code/EMotionFX/Tools/EMotionStudio/EMStudioSDK/Source/FileManager.cpp

@@ -237,7 +237,7 @@ namespace EMStudio
         return false;
     }
 
-    void FileManager::SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, [[maybe_unused]] AZ::TypeId sourceTypeId)
+    void FileManager::SourceFileChanged(AZStd::string relativePath, [[maybe_unused]] AZStd::string scanFolder, [[maybe_unused]] AZ::TypeId sourceTypeId)
     {
         AZStd::string filename;
         AZStd::string assetSourcePath = AZ::IO::FileIOBase::GetInstance()->GetAlias("@projectroot@");

+ 1 - 1
Gems/EMotionFX/Code/Source/Integration/Editor/Components/EditorActorComponent.cpp

@@ -596,7 +596,7 @@ namespace EMotionFX
                 if (dependencyAsset && dependencyAsset.GetType() == azrtti_typeid<AZ::RPI::ModelAsset>())
                 {
                      m_modelReloadedEventHandler = AZ::Render::ModelReloadedEvent::Handler(
-                        [this](AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset)
+                        [this]([[maybe_unused]] AZ::Data::Asset<AZ::RPI::ModelAsset> modelAsset)
                         {
                             m_actorAsset.QueueLoad();
                         });

+ 1 - 1
Gems/EditorPythonBindings/Code/Source/PythonMarshalComponent.cpp

@@ -263,7 +263,7 @@ namespace EditorPythonBindings
             return aznew AZStd::any(address, valueInfo);
         }
 
-        AZStd::optional<PythonMarshalTypeRequests::BehaviorValueResult> PythonToParameterWithProxy(EditorPythonBindings::PythonProxyObject* proxyObj, pybind11::object pyObj, AZ::BehaviorArgument& outValue)
+        AZStd::optional<PythonMarshalTypeRequests::BehaviorValueResult> PythonToParameterWithProxy(EditorPythonBindings::PythonProxyObject* proxyObj,[[maybe_unused]] pybind11::object pyObj, AZ::BehaviorArgument& outValue)
         {
             auto behaviorObject = proxyObj->GetBehaviorObject();
             if (!behaviorObject)

+ 1 - 1
Gems/EditorPythonBindings/Code/Tests/PythonGlobalsTests.cpp

@@ -20,7 +20,7 @@
 
 namespace UnitTest
 {
-    void AcceptTwoStrings(AZStd::string stringValue1, AZStd::string stringValue2)
+    void AcceptTwoStrings([[maybe_unused]] AZStd::string stringValue1, [[maybe_unused]] AZStd::string stringValue2)
     {
         AZ_TracePrintf("python", stringValue1.empty() ? "stringValue1_is_empty" : "stringValue1_has_data");
         AZ_TracePrintf("python", stringValue2.empty() ? "stringValue2_is_empty" : "stringValue2_has_data");

+ 2 - 2
Gems/GameState/Code/Include/GameState/GameStateNotificationBus.h

@@ -31,8 +31,8 @@ namespace GameState
         //! Called when a game state transition occurs
         //! \param[in] oldGameState The old game state we are transitioning from (can be null)
         //! \param[in] newGameState The new game state we are transitioning into (can be null)
-        virtual void OnActiveGameStateChanged(AZStd::shared_ptr<IGameState> oldGameState,
-                                              AZStd::shared_ptr<IGameState> newGameState) {}
+        virtual void OnActiveGameStateChanged([[maybe_unused]] AZStd::shared_ptr<IGameState> oldGameState,
+                                              [[maybe_unused]] AZStd::shared_ptr<IGameState> newGameState) {}
     };
     using GameStateNotificationBus = AZ::EBus<GameStateNotifications>;
 } // namespace GameState

+ 1 - 1
Gems/GameStateSamples/Code/Include/GameStateSamples/GameStatePrimaryUserMonitor.inl

@@ -42,7 +42,7 @@ namespace GameStateSamples
 
     ////////////////////////////////////////////////////////////////////////////////////////////////
     inline void GameStatePrimaryUserMonitor::OnActiveGameStateChanged(AZStd::shared_ptr<IGameState> oldGameState,
-                                                                      AZStd::shared_ptr<IGameState> newGameState)
+                                                                      [[maybe_unused]] AZStd::shared_ptr<IGameState> newGameState)
     {
         if (m_primaryUserSignedOutWhileLevelLoading &&
             azrtti_istypeof<GameStateLevelLoading>(oldGameState.get()))

+ 2 - 2
Gems/GraphModel/Code/Include/GraphModel/GraphModelBus.h

@@ -233,11 +233,11 @@ namespace GraphModelIntegration
 
         //! Sent whenever a graph model slot value changes
         //! \param slot The slot that was modified in the graph.
-        virtual void OnGraphModelSlotModified(GraphModel::SlotPtr slot){};
+        virtual void OnGraphModelSlotModified([[maybe_unused]] GraphModel::SlotPtr slot) {};
 
         //! Something in the graph has been modified
         //! \param node The node that was modified in the graph.  If this is nullptr, some metadata on the graph itself was modified
-        virtual void OnGraphModelGraphModified(GraphModel::NodePtr node){};
+        virtual void OnGraphModelGraphModified([[maybe_unused]] GraphModel::NodePtr node) {};
 
         //! A request has been made to record data for an undoable operation 
         virtual void OnGraphModelRequestUndoPoint(){};

+ 1 - 1
Gems/GraphModel/Code/Include/GraphModel/Integration/EditorMainWindow.h

@@ -50,7 +50,7 @@ namespace GraphModelIntegration
 
         /// Client can override this to handle click events on a wrapper node's action widget
         /// using a GraphModel::NodePtr instead of the lower-level GraphCanvas::NodeId
-        virtual void HandleWrapperNodeActionWidgetClicked(GraphModel::NodePtr wrapperNode, [[maybe_unused]] const QRect& actionWidgetBoundingRect, [[maybe_unused]] const QPointF& scenePoint, [[maybe_unused]] const QPoint& screenPoint) {}
+        virtual void HandleWrapperNodeActionWidgetClicked([[maybe_unused]] GraphModel::NodePtr wrapperNode, [[maybe_unused]] const QRect& actionWidgetBoundingRect, [[maybe_unused]] const QPointF& scenePoint, [[maybe_unused]] const QPoint& screenPoint) {}
 
         /// Keep track of the graphs we create on behalf of the client when
         /// new editor dock widgets are created.

+ 1 - 1
Gems/GraphModel/Code/Source/Model/Module/ModuleGraphManager.cpp

@@ -44,7 +44,7 @@ namespace GraphModel
         AzToolsFramework::AssetSystemBus::Handler::BusDisconnect();
     }
 
-    void ModuleGraphManager::SourceFileChanged(AZStd::string relativePath, AZStd::string scanFolder, AZ::Uuid sourceUUID)
+    void ModuleGraphManager::SourceFileChanged(AZStd::string relativePath, [[maybe_unused]] AZStd::string scanFolder, AZ::Uuid sourceUUID)
     {
         AZStd::string extension;
         if (AzFramework::StringFunc::Path::GetExtension(relativePath.data(), extension) && extension == m_moduleFileExtension)

+ 1 - 1
Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp

@@ -674,7 +674,7 @@ namespace LandscapeCanvasEditor
         UpdateConnectionData(connection, false /* added */);
     }
 
-    void MainWindow::PreOnGraphModelNodeWrapped(GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node)
+    void MainWindow::PreOnGraphModelNodeWrapped([[maybe_unused]] GraphModel::NodePtr wrapperNode, GraphModel::NodePtr node)
     {
         if (m_ignoreGraphUpdates)
         {

+ 1 - 1
Gems/LyShine/Code/Include/LyShine/Animation/IUiAnimation.h

@@ -1060,7 +1060,7 @@ struct IUiAnimationListener
     virtual ~IUiAnimationListener(){}
     //! callback on UI animation events
     virtual void OnUiAnimationEvent(EUiAnimationEvent uiAnimationEvent, IUiAnimSequence* pAnimSequence) = 0;
-    virtual void OnUiTrackEvent(AZStd::string eventName, AZStd::string valueName, [[maybe_unused]] IUiAnimSequence* pAnimSequence) {}
+    virtual void OnUiTrackEvent([[maybe_unused]] AZStd::string eventName, [[maybe_unused]] AZStd::string valueName, [[maybe_unused]] IUiAnimSequence* pAnimSequence) {}
     // </interfuscator:shuffle>
 };
 

+ 2 - 2
Gems/LyShine/Code/Include/LyShine/Bus/UiAnimationBus.h

@@ -113,10 +113,10 @@ public: // member functions
     virtual ~UiAnimationNotifications(){}
 
     //! Called on an animation event
-    virtual void OnUiAnimationEvent(IUiAnimationListener::EUiAnimationEvent uiAnimationEvent, AZStd::string animSequenceName) = 0;
+    virtual void OnUiAnimationEvent([[maybe_unused]] IUiAnimationListener::EUiAnimationEvent uiAnimationEvent,[[maybe_unused]]  AZStd::string animSequenceName) = 0;
 
     //! Called on animation track event triggered
-    virtual void OnUiTrackEvent(AZStd::string eventName, AZStd::string valueName, AZStd::string animSequenceName) {}
+    virtual void OnUiTrackEvent([[maybe_unused]] AZStd::string eventName, [[maybe_unused]] AZStd::string valueName, [[maybe_unused]] AZStd::string animSequenceName) {}
 };
 
 typedef AZ::EBus<UiAnimationNotifications> UiAnimationNotificationBus;

+ 1 - 1
Gems/LyShine/Code/Include/LyShine/Bus/UiVisualBus.h

@@ -39,7 +39,7 @@ public: // member functions
 
     //! Set the override font, if this visual component uses a font this will override it
     //! \param font   If null the font on the visual component will not be overridden
-    virtual void SetOverrideFont(FontFamilyPtr fontFamily) {};
+    virtual void SetOverrideFont([[maybe_unused]] FontFamilyPtr fontFamily) {};
 
     //! Set the override font effect, if this visual component uses a font this will override it
     virtual void SetOverrideFontEffect([[maybe_unused]] unsigned int fontEffectIndex) {};

+ 1 - 1
Gems/LyShine/Code/Tests/AnimationTest.cpp

@@ -55,7 +55,7 @@ namespace UnitTest
             UiAnimationNotificationBus::Handler::BusDisconnect(m_busId);
         }
 
-        void OnUiAnimationEvent([[maybe_unused]] IUiAnimationListener::EUiAnimationEvent uiAnimationEvent, AZStd::string animSequenceName) {};
+        void OnUiAnimationEvent([[maybe_unused]] IUiAnimationListener::EUiAnimationEvent uiAnimationEvent, [[maybe_unused]] AZStd::string animSequenceName) {};
         void OnUiTrackEvent(AZStd::string eventName, AZStd::string valueName, AZStd::string animSequenceName)
         {
             m_recievedEvents.push_back(EventInfo{ eventName, valueName, animSequenceName });

+ 3 - 1
Gems/MessagePopup/Code/Source/LyShineMessagePopup.cpp

@@ -117,7 +117,9 @@ namespace MessagePopup
     }
 
     //-----------------------------------------------------------------------------
-    void LyShineMessagePopup::OnShowPopup(AZ::u32 _popupID, const AZStd::string& _message, EPopupButtons _buttons, EPopupKind _kind, AZStd::function<void(int _button)> _callback, void** _popupClientID)
+    // The callback function is provided by the API, but isn't used in this function, because the above function callign OnHide will
+    // cause the popup callback function to be called.
+    void LyShineMessagePopup::OnShowPopup(AZ::u32 _popupID, const AZStd::string& _message, EPopupButtons _buttons, EPopupKind _kind, [[maybe_unused]] AZStd::function<void(int _button)> _callback, void** _popupClientID)
     {
         AZ::EntityId canvasEntityId;
         bool isNavigationSupported = false;

+ 1 - 1
Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp

@@ -654,7 +654,7 @@ namespace Multiplayer
         return ticket;
     }
 
-    void NetworkEntityManager::OnRootSpawnableAssigned(AZ::Data::Asset<AzFramework::Spawnable> rootSpawnable,
+    void NetworkEntityManager::OnRootSpawnableAssigned([[maybe_unused]] AZ::Data::Asset<AzFramework::Spawnable> rootSpawnable,
         [[maybe_unused]] uint32_t generation)
     {
         auto* multiplayer = GetMultiplayer();

+ 1 - 1
Gems/PhysX/Core/Code/Source/HeightfieldColliderComponent.cpp

@@ -110,7 +110,7 @@ namespace PhysX
         }
     }
 
-    void HeightfieldColliderComponent::OnAssetError(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void HeightfieldColliderComponent::OnAssetError([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         InitHeightfieldCollider(HeightfieldCollider::DataSource::GenerateNewHeightfield);
     }

+ 3 - 3
Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/FunctionNodeDescriptorComponent.cpp

@@ -68,17 +68,17 @@ namespace ScriptCanvasEditor
         AZ::Data::AssetBus::Handler::BusDisconnect();
     }
 
-    void FunctionNodeDescriptorComponent::OnAssetReloaded(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void FunctionNodeDescriptorComponent::OnAssetReloaded([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         TriggerUpdate();
     }
 
-    void FunctionNodeDescriptorComponent::OnAssetReloadError(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void FunctionNodeDescriptorComponent::OnAssetReloadError([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         TriggerUpdate();
     }
 
-    void FunctionNodeDescriptorComponent::OnAssetError(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void FunctionNodeDescriptorComponent::OnAssetError([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         TriggerUpdate();
     }

+ 1 - 1
Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventReceiverNodeDescriptorComponent.cpp

@@ -466,7 +466,7 @@ namespace ScriptCanvasEditor
         return this;
     }
 
-    void ScriptEventReceiverNodeDescriptorComponent::OnAssetReloaded(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void ScriptEventReceiverNodeDescriptorComponent::OnAssetReloaded([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         AZ::EntityId graphCanvasGraphId;
         GraphCanvas::SceneMemberRequestBus::EventResult(graphCanvasGraphId, GetEntityId(), &GraphCanvas::SceneMemberRequests::GetScene);

+ 1 - 1
Gems/ScriptCanvas/Code/Editor/GraphCanvas/Components/NodeDescriptors/ScriptEventSenderNodeDescriptorComponent.cpp

@@ -74,7 +74,7 @@ namespace ScriptCanvasEditor
         SignalNeedsVersionConversion();
     }
 
-    void ScriptEventSenderNodeDescriptorComponent::OnAssetReloaded(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void ScriptEventSenderNodeDescriptorComponent::OnAssetReloaded([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         SignalNeedsVersionConversion();
     }

+ 1 - 1
Gems/ScriptCanvas/Code/Include/ScriptCanvas/Grammar/ParsingUtilities.cpp

@@ -145,7 +145,7 @@ namespace ParsingUtilitiesCpp
             m_result += "\n";
         }
 
-        void EvaluateRoot(ExecutionTreeConstPtr node, const Slot*)
+        void EvaluateRoot(ExecutionTreeConstPtr, const Slot*)
         {
             m_result += "\nRoot:\n";
         }

+ 1 - 1
Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/ReceiveScriptEvent.cpp

@@ -140,7 +140,7 @@ namespace ScriptCanvas
                 }
             }
 
-            void ReceiveScriptEvent::InitializeEvent(AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> asset, int eventIndex, SlotIdMapping& populationMapping)
+            void ReceiveScriptEvent::InitializeEvent([[maybe_unused]] AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> asset, int eventIndex, SlotIdMapping& populationMapping)
             {
                 if (!m_handler)
                 {

+ 1 - 1
Gems/ScriptCanvas/Code/Include/ScriptCanvas/Libraries/Core/SendScriptEvent.cpp

@@ -369,7 +369,7 @@ namespace ScriptCanvas
                 }
             }
 
-            bool SendScriptEvent::RegisterScriptEvent(AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> asset)
+            bool SendScriptEvent::RegisterScriptEvent([[maybe_unused]] AZ::Data::Asset<ScriptEvents::ScriptEventsAsset> asset)
             {
                 if (!m_scriptEvent)
                 {

+ 2 - 2
Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLua.cpp

@@ -1501,7 +1501,7 @@ namespace ScriptCanvas
             }
         }
 
-        void GraphToLua::WriteDebugInfoVariableChange(Grammar::ExecutionTreeConstPtr execution, Grammar::OutputAssignmentConstPtr output)
+        void GraphToLua::WriteDebugInfoVariableChange([[maybe_unused]] Grammar::ExecutionTreeConstPtr execution, Grammar::OutputAssignmentConstPtr output)
         {
             if (IsDebugInfoWritten())
             {
@@ -1663,7 +1663,7 @@ namespace ScriptCanvas
             }
         }
 
-        void GraphToLua::WriteFunctionCallNullCheckPost(Grammar::ExecutionTreeConstPtr execution)
+        void GraphToLua::WriteFunctionCallNullCheckPost([[maybe_unused]] Grammar::ExecutionTreeConstPtr execution)
         {
             m_dotLua.Outdent();
             m_dotLua.WriteLineIndented("end");

+ 2 - 2
Gems/ScriptCanvas/Code/Include/ScriptCanvas/Translation/GraphToLuaUtility.cpp

@@ -29,7 +29,7 @@ namespace ScriptCanvas
     namespace Translation
     {
 
-        void CheckConversionStringPost(Writer& writer, Grammar::VariableConstPtr source, const Grammar::ConversionByIndex& conversions, size_t index)
+        void CheckConversionStringPost(Writer& writer, [[maybe_unused]] Grammar::VariableConstPtr source, const Grammar::ConversionByIndex& conversions, size_t index)
         {
             auto iter = conversions.find(index);
             if (iter == conversions.end())
@@ -73,7 +73,7 @@ namespace ScriptCanvas
             }
         }
 
-        void CheckConversionStringPre(Writer& writer, Grammar::VariableConstPtr source, const Grammar::ConversionByIndex& conversions, size_t index)
+        void CheckConversionStringPre(Writer& writer,[[maybe_unused]] Grammar::VariableConstPtr source, const Grammar::ConversionByIndex& conversions, size_t index)
         {
             auto iter = conversions.find(index);
             if (iter == conversions.end())

+ 1 - 1
Gems/ScriptEvents/Code/Include/ScriptEvents/ScriptEventsAssetRef.h

@@ -84,7 +84,7 @@ namespace ScriptEvents
 
         void OnAssetSaved(AZ::Data::Asset<AZ::Data::AssetData> asset, [[maybe_unused]] bool isSuccessful) override
         {
-            SetAsset(m_asset);
+            SetAsset(asset);
         }
         //=====================================================================
 

+ 1 - 1
Gems/ScriptEvents/Code/Source/Editor/ScriptEventsSystemEditorComponent.cpp

@@ -166,7 +166,7 @@ namespace ScriptEventsEditor
         scriptEventAsset->m_definition.IncreaseVersion();
     }
 
-    void ScriptEventAssetHandler::BeforePropertyEdit(AzToolsFramework::InstanceDataNode* node, AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void ScriptEventAssetHandler::BeforePropertyEdit(AzToolsFramework::InstanceDataNode* node, [[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         ScriptEventData::VersionedProperty* property = nullptr;
         AzToolsFramework::InstanceDataNode* parent = node;

+ 1 - 1
Gems/ScriptEvents/Code/Source/ScriptEventsAssetRef.cpp

@@ -99,7 +99,7 @@ namespace ScriptEvents
         return AZ::Edit::PropertyRefreshLevels::None;
     }
 
-    void ScriptEventsAssetRef::OnAssetReady(AZ::Data::Asset<AZ::Data::AssetData> asset)
+    void ScriptEventsAssetRef::OnAssetReady([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset)
     {
         if (ScriptEventsAsset* scriptEventAsset = m_asset.GetAs<ScriptEventsAsset>())
         {

+ 3 - 3
Gems/ScriptEvents/Code/Tests/Tests/ScriptEventsTest_Core.cpp

@@ -231,13 +231,13 @@ namespace ScriptEventsTests
             AZ::Data::AssetBus::Handler::BusDisconnect();
         }
         
-        void OnAssetError(AZ::Data::Asset<AZ::Data::AssetData> assetData) override
+        void OnAssetError([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> assetData) override
         {
             EXPECT_TRUE(false);
             AZ::Data::AssetBus::Handler::BusDisconnect();
         }
 
-        void OnAssetReady(AZ::Data::Asset<AZ::Data::AssetData>) override
+        void OnAssetReady([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData>) override
         {
             m_ready++;
 
@@ -247,7 +247,7 @@ namespace ScriptEventsTests
             m_onReadyCallback();
         }
 
-        void OnAssetSaved(AZ::Data::Asset<AZ::Data::AssetData> asset, [[maybe_unused]] bool isSuccessful) override
+        void OnAssetSaved([[maybe_unused]] AZ::Data::Asset<AZ::Data::AssetData> asset, [[maybe_unused]] bool isSuccessful) override
         {
             AZ::Data::AssetBus::Handler::BusDisconnect();
             AZ::Data::AssetManager::Instance().DispatchEvents();

+ 1 - 1
Gems/Vegetation/Code/Tests/PrefabInstanceSpawnerTests.cpp

@@ -129,7 +129,7 @@ namespace UnitTest
         }
         AZ::Data::AssetHandler::LoadResult LoadAssetData(
             const AZ::Data::Asset<AZ::Data::AssetData>& asset,
-            AZStd::shared_ptr<AZ::Data::AssetDataStream> stream,
+            [[maybe_unused]] AZStd::shared_ptr<AZ::Data::AssetDataStream> stream,
             [[maybe_unused]] const AZ::Data::AssetFilterCB& assetLoadFilterCB) override
         {
             MockAssetData* temp = reinterpret_cast<MockAssetData*>(asset.GetData());