Fix unused warnings release (#3677)

* Release build fix for Windows
* Release build fix for Android
* Release build fix for Windows
* Release build fix for Android
* Release build fix for Linux
* Release build fix for Mac
* Release build fix for iOS

Signed-off-by: Steve Pham <spham@amazon.com>
This commit is contained in:
Steve Pham
2021-08-30 13:10:41 -07:00
committed by GitHub
parent da6bdd5b43
commit fa0f2a1007
94 changed files with 150 additions and 130 deletions
@@ -2885,7 +2885,7 @@ namespace ScriptCanvas
if (node == nullptr)
{
AZStd::string assetName = m_graphRequestBus->GetAssetName();
AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId());
[[maybe_unused]] AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId());
AZ_Warning("Script Canvas", false, "Unable to find node with id (id: %s) in the graph '%s'. Most likely the node was serialized with a type that is no longer reflected",
assetNodeId.ToString().data(), assetName.data());
@@ -2900,7 +2900,7 @@ namespace ScriptCanvas
if (!endpointSlot)
{
AZStd::string assetName = m_graphRequestBus->GetAssetName();
AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId());
[[maybe_unused]] AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId());
AZ_Warning("Script Canvas", false, "Endpoint was missing slot. id (id: %s) in the graph '%s'.",
assetNodeId.ToString().data(), assetName.data());
@@ -2934,7 +2934,7 @@ namespace ScriptCanvas
if (node == nullptr)
{
AZStd::string assetName = m_graphRequestBus->GetAssetName();
AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId());
[[maybe_unused]] AZ::EntityId assetNodeId = m_graphRequestBus->FindAssetNodeIdByRuntimeNodeId(endpoint.GetNodeId());
AZ_Error("Script Canvas", false, "Unable to find node with id (id: %s) in the graph '%s'. Most likely the node was serialized with a type that is no longer reflected",
assetNodeId.ToString().data(), assetName.data());
@@ -549,7 +549,7 @@ namespace ScriptCanvas
{
using namespace ExecutionInterpretedAPICpp;
// Lua: usernodeable, keyCount
const int argsCount = lua_gettop(lua);
[[maybe_unused]] const int argsCount = lua_gettop(lua);
AZ_Assert(argsCount == 2, "InitializeNodeableOutKeys: Error in compiled Lua file, not enough arguments");
AZ_Assert(lua_isuserdata(lua, 1), "InitializeNodeableOutKeys: Error in compiled lua file, 1st argument to SetExecutionOut is not userdata (Nodeable)");
Nodeable* nodeable = AZ::ScriptValue<Nodeable*>::StackRead(lua, 1);
@@ -23,7 +23,7 @@ namespace ScriptCanvas
{
auto nodeCallWrapper = [callable = AZStd::forward<Callable>(callable)](AZ::BehaviorValueParameter* result, AZ::BehaviorValueParameter* arguments, int numArguments) mutable
{
constexpr size_t numFunctorArguments = sizeof...(Args);
[[maybe_unused]] constexpr size_t numFunctorArguments = sizeof...(Args);
(void)numArguments;
AZ_Assert(numArguments == numFunctorArguments, "number of arguments doesn't match number of parameters");
AZ_Assert(result, "no null result allowed");
@@ -39,7 +39,7 @@ namespace ScriptCanvas
{
auto nodeCallWrapper = [callable = AZStd::forward<Callable>(callable)](AZ::BehaviorValueParameter*, AZ::BehaviorValueParameter* arguments, int numArguments) mutable
{
constexpr size_t numFunctorArguments = sizeof...(Args);
[[maybe_unused]] constexpr size_t numFunctorArguments = sizeof...(Args);
(void)numArguments;
AZ_Assert(numArguments == numFunctorArguments, "number of arguments doesn't match number of parameters");
AZStd::invoke(callable, *arguments[IndexSequence].GetAsUnsafe<Args>()...);
@@ -45,7 +45,7 @@ namespace ScriptCanvas
int tupleGetFuncIndex = -1;
if (tupleGetFuncAttrReader.Read<int>(tupleGetFuncIndex))
{
auto insertIter = tupleGetMethodMap.emplace(tupleGetFuncIndex, behaviorMethod);
[[maybe_unused]] auto insertIter = tupleGetMethodMap.emplace(tupleGetFuncIndex, behaviorMethod);
AZ_Error("Script Canvas", insertIter.second, "Multiple methods with the same TupleGetFunctionIndex attribute"
"has been registered for the class name: %s with typeid: %s",
behaviorClass->m_name.data(), behaviorClass->m_typeId.ToString<AZStd::string>().data())