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:
@@ -72,7 +72,7 @@
|
||||
#include <cctype>
|
||||
#include <stdio.h>
|
||||
|
||||
static const char* s_azFrameworkWarningWindow = "AzFramework";
|
||||
[[maybe_unused]] static const char* s_azFrameworkWarningWindow = "AzFramework";
|
||||
|
||||
namespace AzFramework
|
||||
{
|
||||
@@ -602,7 +602,7 @@ namespace AzFramework
|
||||
|
||||
void Application::SetRootPath(RootPathType type, const char* source)
|
||||
{
|
||||
const size_t sourceLen = strlen(source);
|
||||
[[maybe_unused]] const size_t sourceLen = strlen(source);
|
||||
|
||||
// Copy the source path to the intended root path and correct the path separators as well
|
||||
switch (type)
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace AzFramework::AssetBenchmark
|
||||
AZStd::thread benchmarkThread([assetList = AZStd::move(sourceAssetList), loadBlocking]()
|
||||
{
|
||||
// Define the set of loading stats to track
|
||||
const size_t initialRequests = assetList.size();
|
||||
[[maybe_unused]] const size_t initialRequests = assetList.size();
|
||||
size_t previouslyLoadedAssets = 0;
|
||||
size_t newlyLoadedAssets = 0;
|
||||
size_t loadErrors = 0;
|
||||
|
||||
@@ -24,9 +24,9 @@ namespace AZ
|
||||
namespace IO
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
const char* const NetworkFileIOChannel = "NetworkFileIO";
|
||||
[[maybe_unused]] const char* const NetworkFileIOChannel = "NetworkFileIO";
|
||||
#ifndef REMOTEFILEIO_IS_NETWORKFILEIO
|
||||
const char* const RemoteFileIOChannel = "RemoteFileIO";
|
||||
[[maybe_unused]] const char* const RemoteFileIOChannel = "RemoteFileIO";
|
||||
#ifdef REMOTEFILEIO_SYNC_CHECK
|
||||
const char* const RemoteFileCacheChannel = "RemoteFileCache";
|
||||
#endif
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace AzFramework
|
||||
//trying to connect, if any error occurs start the disconnect thread
|
||||
void AssetProcessorConnection::ConnectThread()
|
||||
{
|
||||
static constexpr char ConnectThreadWindow[] = "AssetProcessorConnection::ConnectThread";
|
||||
[[maybe_unused]] static constexpr char ConnectThreadWindow[] = "AssetProcessorConnection::ConnectThread";
|
||||
|
||||
//check for join before doing an op
|
||||
if (m_connectThread.m_join)
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace AzFramework
|
||||
const AZ::Frustum::PlaneId planeId3)
|
||||
{
|
||||
AZ::Vector3 corner = AZ::Vector3::CreateZero();
|
||||
const auto intersectionOkay = AZ::ShapeIntersection::IntersectThreePlanes(
|
||||
[[maybe_unused]] const auto intersectionOkay = AZ::ShapeIntersection::IntersectThreePlanes(
|
||||
frustum.GetPlane(planeId1), frustum.GetPlane(planeId2), frustum.GetPlane(planeId3), corner);
|
||||
AZ_Assert(intersectionOkay, "Plane intersection of Frustum failed");
|
||||
|
||||
|
||||
+1
-1
@@ -175,7 +175,7 @@ namespace AzFramework
|
||||
m_packedSensorDataArray = new float[packedSensorDataLength];
|
||||
|
||||
// create the java instance
|
||||
bool ret = m_motionSensorManager->CreateInstance("(Landroid/app/Activity;)V", AZ::Android::Utils::GetActivityRef());
|
||||
[[maybe_unused]] bool ret = m_motionSensorManager->CreateInstance("(Landroid/app/Activity;)V", AZ::Android::Utils::GetActivityRef());
|
||||
AZ_Assert(ret, "Failed to create the MotionSensorManager Java instance.");
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ namespace AzFramework
|
||||
});
|
||||
|
||||
// create the java instance
|
||||
bool ret = m_keyboardHandler->CreateInstance("(Landroid/app/Activity;)V", AZ::Android::Utils::GetActivityRef());
|
||||
[[maybe_unused]] bool ret = m_keyboardHandler->CreateInstance("(Landroid/app/Activity;)V", AZ::Android::Utils::GetActivityRef());
|
||||
AZ_Assert(ret, "Failed to create the KeyboardHandler Java instance.");
|
||||
|
||||
// Connect to the raw input notifications bus
|
||||
|
||||
+2
-2
@@ -78,7 +78,7 @@ namespace AzFramework
|
||||
FD_ZERO(&set);
|
||||
FD_SET(handle->GetHandle(), &set);
|
||||
|
||||
int numReady = select(handle->GetHandle() + 1, &set, NULL, NULL, NULL);
|
||||
[[maybe_unused]] int numReady = select(handle->GetHandle() + 1, &set, NULL, NULL, NULL);
|
||||
|
||||
// if numReady == -1 and errno == EINTR then the child process died unexpectedly and
|
||||
// the handle was closed. Not something to assert about in regards to trying to read
|
||||
@@ -87,7 +87,7 @@ namespace AzFramework
|
||||
// dead and return any error codes the child may have written to the error stream.
|
||||
AZ_Assert(numReady != -1 || errno == EINTR, "Could not determine if any data is available for reading due to an error. Errno: %d", errno);
|
||||
|
||||
const bool wasSet = FD_ISSET(handle->GetHandle(), &set);
|
||||
[[maybe_unused]] const bool wasSet = FD_ISSET(handle->GetHandle(), &set);
|
||||
AZ_Assert(wasSet, "handle was not set when we selected it for read");
|
||||
|
||||
return 0;
|
||||
|
||||
+2
-2
@@ -75,7 +75,7 @@ namespace AzFramework
|
||||
FD_ZERO(&set);
|
||||
FD_SET(handle->GetHandle(), &set);
|
||||
|
||||
int numReady = select(handle->GetHandle() + 1, &set, NULL, NULL, NULL);
|
||||
[[maybe_unused]] int numReady = select(handle->GetHandle() + 1, &set, NULL, NULL, NULL);
|
||||
|
||||
// if numReady == -1 and errno == EINTR then the child process died unexpectedly and
|
||||
// the handle was closed. Not something to assert about in regards to trying to read
|
||||
@@ -84,7 +84,7 @@ namespace AzFramework
|
||||
// dead and return any error codes the child may have written to the error stream.
|
||||
AZ_Assert(numReady != -1 || errno == EINTR, "Could not determine if any data is available for reading due to an error. Errno: %d", errno);
|
||||
|
||||
const bool wasSet = FD_ISSET(handle->GetHandle(), &set);
|
||||
[[maybe_unused]] const bool wasSet = FD_ISSET(handle->GetHandle(), &set);
|
||||
AZ_Assert(wasSet, "handle was not set when we selected it for read");
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user