From 3f5044e8657c02b8bfa4f62f8b23a4e5ca61e0af Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Fri, 16 Feb 2018 20:53:09 -0800 Subject: Fixed few compiler warnings --- Tests/TestApp/src/SmartPointerTest.cpp | 12 ++++++++---- Tests/TestApp/src/TestApp.cpp | 4 ++-- Tests/TestApp/src/TestSamplerCreation.cpp | 3 --- Tests/TestApp/src/TestTextureCreation.cpp | 4 ++-- 4 files changed, 12 insertions(+), 11 deletions(-) (limited to 'Tests/TestApp/src') diff --git a/Tests/TestApp/src/SmartPointerTest.cpp b/Tests/TestApp/src/SmartPointerTest.cpp index dbeed7f..59cbae8 100644 --- a/Tests/TestApp/src/SmartPointerTest.cpp +++ b/Tests/TestApp/src/SmartPointerTest.cpp @@ -280,10 +280,9 @@ void SmartPointerTest::RunConcurrencyTest() } -SmartPointerTest::SmartPointerTest() : - m_bThreadStart{false, false}, - m_NumThreadsCompleted(0), - m_pSharedObject(nullptr) +SmartPointerTest::SmartPointerTest() : + m_pSharedObject(nullptr), + m_NumThreadsCompleted(0) { // Test constructors of RefCntAutoPtr { @@ -333,7 +332,9 @@ SmartPointerTest::SmartPointerTest() : pRawPtr2->Release(); auto *pRawPtr3 = SmartPtr().Detach(); + (void)pRawPtr3; auto *pRawPtr4 = SmartPtr(MakeNewObj()).Detach(); + (void)pRawPtr4; pRawPtr4->Release(); } } @@ -563,6 +564,7 @@ SmartPointerTest::SmartPointerTest() : try { auto *pExceptionTest = MakeNewObj(); + (void)pExceptionTest; } catch(std::runtime_error &) { @@ -589,6 +591,7 @@ SmartPointerTest::SmartPointerTest() : try { auto *pExceptionTest = NEW_RC_OBJ( DefaultRawMemoryAllocator::GetAllocator(), "Test object", ExceptionTest2)(); + (void)pExceptionTest; } catch(std::runtime_error &) { @@ -625,6 +628,7 @@ SmartPointerTest::SmartPointerTest() : try { auto *pExceptionTest = NEW_RC_OBJ( DefaultRawMemoryAllocator::GetAllocator(), "Test object", ExceptionTest3)(); + (void)pExceptionTest; } catch(std::runtime_error &) { diff --git a/Tests/TestApp/src/TestApp.cpp b/Tests/TestApp/src/TestApp.cpp index ff2d928..c57cf97 100644 --- a/Tests/TestApp/src/TestApp.cpp +++ b/Tests/TestApp/src/TestApp.cpp @@ -427,8 +427,8 @@ void TestApp::WindowResize(int width, int height) if (m_pSwapChain) { m_pSwapChain->Resize(width, height); - auto SCWidth = m_pSwapChain->GetDesc().Width; - auto SCHeight = m_pSwapChain->GetDesc().Height; + //auto SCWidth = m_pSwapChain->GetDesc().Width; + //auto SCHeight = m_pSwapChain->GetDesc().Height; } diff --git a/Tests/TestApp/src/TestSamplerCreation.cpp b/Tests/TestApp/src/TestSamplerCreation.cpp index 2b30e2a..d058e34 100644 --- a/Tests/TestApp/src/TestSamplerCreation.cpp +++ b/Tests/TestApp/src/TestSamplerCreation.cpp @@ -27,9 +27,6 @@ using namespace Diligent; -const bool bIsGL43 = false; - - TestSamplerCreation::TestSamplerCreation(IRenderDevice *pDevice) : m_pDevice(pDevice) { diff --git a/Tests/TestApp/src/TestTextureCreation.cpp b/Tests/TestApp/src/TestTextureCreation.cpp index ab1967e..029e6e4 100644 --- a/Tests/TestApp/src/TestTextureCreation.cpp +++ b/Tests/TestApp/src/TestTextureCreation.cpp @@ -48,8 +48,8 @@ public: TextureCreationVerifier( IRenderDevice *pDevice, IDeviceContext *pContext ) : m_pDevice(pDevice), m_pDeviceContext(pContext), - m_TextureFormat(TEX_FORMAT_UNKNOWN), m_BindFlags(0), + m_TextureFormat(TEX_FORMAT_UNKNOWN), m_PixelSize(0), m_bTestDataUpload(False) { @@ -547,7 +547,7 @@ TestTextureCreation::TestTextureCreation( IRenderDevice *pDevice, IDeviceContext TextureCreationVerifier Verifier(pDevice, pContext); const Uint32 BindSRU = BIND_SHADER_RESOURCE | BIND_RENDER_TARGET | BIND_UNORDERED_ACCESS; const Uint32 BindSR = BIND_SHADER_RESOURCE | BIND_RENDER_TARGET; - const Uint32 BindSD = BIND_SHADER_RESOURCE | BIND_DEPTH_STENCIL; + //const Uint32 BindSD = BIND_SHADER_RESOURCE | BIND_DEPTH_STENCIL; const Uint32 BindSU = BIND_SHADER_RESOURCE | BIND_UNORDERED_ACCESS; const Uint32 BindD = BIND_DEPTH_STENCIL; const Uint32 BindS = BIND_SHADER_RESOURCE; -- cgit v1.2.3