Skip to content

Commit

Permalink
Resolve clang/gcc warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Jeremy Ong <[email protected]>
  • Loading branch information
jeremyong-az committed Mar 16, 2022
1 parent 0340cf4 commit b91f0bf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Gems/Atom/Utils/Code/Source/ImGuiGpuProfiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ namespace AZ

if (!m_captureMessage.empty())
{
ImGui::Text(m_captureMessage.c_str());
ImGui::Text("%s", m_captureMessage.c_str());
}

if (m_hostTreemap)
Expand Down Expand Up @@ -1752,8 +1752,10 @@ namespace AZ

// C4702: Unreachable code
// MSVC 2022 believes that `return true;` below is unreacahable, which is not true.
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4702)
#endif
template <typename T>
bool parseCSVField(const AZStd::string& field, T& out)
{
Expand Down Expand Up @@ -1790,7 +1792,9 @@ namespace AZ

return true;
}
#ifdef _MSC_VER
#pragma warning(pop)
#endif

void ImGuiGpuMemoryView::LoadFromCSV(const AZStd::string& fileName)
{
Expand Down

0 comments on commit b91f0bf

Please sign in to comment.