Enabling several warnings in Clang that required just small fixes
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -47,7 +47,6 @@ struct ToolTip
|
||||
class CEditorPanelUtils_Impl
|
||||
: public IEditorPanelUtils
|
||||
{
|
||||
#pragma region Drag & Drop
|
||||
public:
|
||||
void SetViewportDragOperation(void(* dropCallback)(CViewport* viewport, int dragPointX, int dragPointY, void* custom), void* custom) override
|
||||
{
|
||||
@@ -56,8 +55,7 @@ public:
|
||||
GetIEditor()->GetViewManager()->GetView(i)->SetGlobalDropCallback(dropCallback, custom);
|
||||
}
|
||||
}
|
||||
#pragma endregion
|
||||
#pragma region Preview Window
|
||||
|
||||
public:
|
||||
|
||||
int PreviewWindow_GetDisplaySettingsDebugFlags(CDisplaySettings* settings) override
|
||||
@@ -72,8 +70,6 @@ public:
|
||||
settings->SetDebugFlags(flags);
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region Shortcuts
|
||||
protected:
|
||||
QVector<HotKey> hotkeys;
|
||||
bool m_hotkeysAreEnabled;
|
||||
@@ -408,8 +404,6 @@ public:
|
||||
return m_hotkeysAreEnabled;
|
||||
}
|
||||
|
||||
#pragma endregion
|
||||
#pragma region ToolTip
|
||||
protected:
|
||||
QMap<QString, ToolTip> m_tooltips;
|
||||
|
||||
@@ -539,7 +533,6 @@ public:
|
||||
}
|
||||
return GetToolTip(path).disabledContent;
|
||||
}
|
||||
#pragma endregion ToolTip
|
||||
};
|
||||
|
||||
IEditorPanelUtils* CreateEditorPanelUtils()
|
||||
|
||||
@@ -35,7 +35,6 @@
|
||||
#include "CryEdit.h"
|
||||
#include "MainWindow.h"
|
||||
|
||||
#pragma comment(lib, "Gdi32.lib")
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Global Instance of Editor settings.
|
||||
|
||||
@@ -480,7 +480,9 @@ namespace UnitTest
|
||||
TEST_F(AnyTest, Any_CopyAssignSelfEmpty_IsEmpty)
|
||||
{
|
||||
any a;
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
a = a;
|
||||
AZ_POP_DISABLE_WARNING
|
||||
EXPECT_TRUE(a.empty());
|
||||
}
|
||||
|
||||
@@ -491,7 +493,9 @@ namespace UnitTest
|
||||
any a((TypeParam(1)));
|
||||
EXPECT_EQ(TypeParam::s_count, 1);
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
a = a;
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
EXPECT_EQ(TypeParam::s_count, 1);
|
||||
EXPECT_EQ(any_cast<const TypeParam&>(a).val(), 1);
|
||||
|
||||
@@ -285,7 +285,9 @@ namespace UnitTest
|
||||
|
||||
// Invocation and self-assignment
|
||||
global_int = 0;
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
v1 = v1;
|
||||
AZ_POP_DISABLE_WARNING
|
||||
v1();
|
||||
AZ_TEST_ASSERT(global_int == 3);
|
||||
|
||||
@@ -294,7 +296,9 @@ namespace UnitTest
|
||||
|
||||
// Invocation and self-assignment
|
||||
global_int = 0;
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
v1 = (v1);
|
||||
AZ_POP_DISABLE_WARNING
|
||||
v1();
|
||||
AZ_TEST_ASSERT(global_int == 5);
|
||||
|
||||
|
||||
@@ -920,7 +920,9 @@ namespace UnitTest
|
||||
|
||||
AZStd::shared_ptr<incomplete> p1;
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
p1 = p1;
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
EXPECT_EQ(p1, p1);
|
||||
EXPECT_FALSE(p1);
|
||||
@@ -950,7 +952,9 @@ namespace UnitTest
|
||||
{
|
||||
AZStd::shared_ptr<void> p1;
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
p1 = p1;
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
EXPECT_EQ(p1, p1);
|
||||
EXPECT_FALSE(p1);
|
||||
@@ -996,7 +1000,9 @@ namespace UnitTest
|
||||
using X = SharedPtr::test::X;
|
||||
AZStd::shared_ptr<X> p1;
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(, "-Wself-assign-overloaded")
|
||||
p1 = p1;
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
EXPECT_EQ(p1, p1);
|
||||
EXPECT_FALSE(p1);
|
||||
|
||||
@@ -296,9 +296,8 @@ namespace ImageProcessingAtom
|
||||
/* skip leading and trailing zeros */
|
||||
if (trimZeros)
|
||||
{
|
||||
/* set i0 and i1 to the nonzero support of the filter */
|
||||
i0 = i0;
|
||||
i1 = i1 = lastnonzero + 1;
|
||||
/* set i1 to the nonzero support of the filter */
|
||||
i1 = lastnonzero + 1;
|
||||
}
|
||||
|
||||
if (sumiWeights != WEIGHTONE)
|
||||
|
||||
@@ -616,8 +616,6 @@ namespace ImageProcessingAtom
|
||||
a_FilterExtents[oppositeFaceIdx].Augment((a_SrcSize-1), (a_SrcSize-1), 0);
|
||||
}
|
||||
}
|
||||
|
||||
minV=minV;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/base.h>
|
||||
#include <Azcore/PlatformIncl.h>
|
||||
#include <AzCore/PlatformIncl.h>
|
||||
#include <AzCore/std/algorithm.h>
|
||||
#include <vulkan/vulkan.h>
|
||||
#include <limits.h>
|
||||
|
||||
@@ -796,7 +796,7 @@ namespace PhysX
|
||||
entityRigidbody->GetRigidBody()->IsKinematic() == false)
|
||||
{
|
||||
AZStd::string assetPath = m_shapeConfiguration.m_physicsAsset.m_configuration.m_asset.GetHint().c_str();
|
||||
const uint lastSlash = static_cast<uint>(assetPath.rfind('/'));
|
||||
const size_t lastSlash = assetPath.rfind('/');
|
||||
if (lastSlash != AZStd::string::npos)
|
||||
{
|
||||
assetPath = assetPath.substr(lastSlash + 1);
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@ namespace ScriptCanvasDeveloper
|
||||
ProcessCreationSet();
|
||||
}
|
||||
}
|
||||
else if (stateId == stateId == m_duplicateCheckpoint->GetStateId())
|
||||
else if (stateId == m_duplicateCheckpoint->GetStateId())
|
||||
{
|
||||
if (m_createdSet.empty())
|
||||
{
|
||||
|
||||
@@ -18,23 +18,13 @@ ly_append_configurations_options(
|
||||
|
||||
# Disabled warnings (please do not disable any others without first consulting ly-warnings)
|
||||
-Wrange-loop-analysis
|
||||
-Wno-unknown-warning-option
|
||||
"-Wno-#pragma-messages"
|
||||
-Wno-absolute-value
|
||||
-Wno-dynamic-class-memaccess
|
||||
-Wno-unknown-warning-option # used as a way to mark warnings that are MSVC only
|
||||
-Wno-format-security
|
||||
-Wno-inconsistent-missing-override
|
||||
-Wno-invalid-offsetof
|
||||
-Wno-multichar
|
||||
-Wno-parentheses
|
||||
-Wno-reorder
|
||||
-Wno-self-assign
|
||||
-Wno-switch
|
||||
-Wno-tautological-compare
|
||||
-Wno-undefined-var-template
|
||||
-Wno-unknown-pragmas
|
||||
# Workaround for compiler seeing file case differently from what OS show in console.
|
||||
-Wno-nonportable-include-path
|
||||
|
||||
COMPILATION_DEBUG
|
||||
-O0 # No optimization
|
||||
|
||||
Reference in New Issue
Block a user