Skip to content

Commit 6fc49ac

Browse files
Fixed some code scanning alerts
1 parent dc00159 commit 6fc49ac

File tree

6 files changed

+10
-5
lines changed

6 files changed

+10
-5
lines changed

Graphics/GraphicsEngineD3D11/include/PipelineResourceAttribsD3D11.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ struct D3D11ResourceBindPoints
6767
}
6868

6969
D3D11ResourceBindPoints(const D3D11ResourceBindPoints&) noexcept = default;
70+
D3D11ResourceBindPoints& operator=(const D3D11ResourceBindPoints&) = default;
7071

7172
SHADER_TYPE GetActiveStages() const
7273
{

Graphics/GraphicsEngineD3D12/include/TextureD3D12Impl.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ class TextureD3D12Impl final : public TextureBase<EngineD3D12ImplTraits>, public
9292

9393
protected:
9494
void CreateViewInternal(const struct TextureViewDesc& ViewDesc, ITextureView** ppView, bool bIsDefaultView) override final;
95-
//void PrepareD3D12InitData(const TextureData &InitData, Uint32 NumSubresources, std::vector<D3D12_SUBRESOURCE_DATA> &D3D12InitData);
9695

9796
void CreateSRV(const TextureViewDesc& SRVDesc, D3D12_CPU_DESCRIPTOR_HANDLE SRVHandle);
9897
void CreateRTV(const TextureViewDesc& RTVDesc, D3D12_CPU_DESCRIPTOR_HANDLE RTVHandle);

Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,6 +1666,7 @@ void DeviceContextD3D12Impl::MapBuffer(IBuffer* pBuffer, MAP_TYPE MapType, MAP_F
16661666
DEV_CHECK_ERR(pd3d12Resource != nullptr, "USAGE_STAGING buffer mapped for writing must initialize D3D12 resource");
16671667
if (MapFlags & MAP_FLAG_DISCARD)
16681668
{
1669+
// Nothing to do
16691670
}
16701671
pd3d12Resource->Map(0, nullptr, &pMappedData);
16711672
}

Graphics/GraphicsEngineD3D12/src/QueryManagerD3D12.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,9 @@ static Uint32 GetQueryDataSize(QUERY_TYPE QueryType)
5050
case QUERY_TYPE_TIMESTAMP:
5151
case QUERY_TYPE_DURATION:
5252
return sizeof(Uint64);
53-
break;
5453

5554
case QUERY_TYPE_PIPELINE_STATISTICS:
5655
return sizeof(D3D12_QUERY_DATA_PIPELINE_STATISTICS);
57-
break;
5856

5957
static_assert(QUERY_TYPE_NUM_TYPES == 6, "Not all QUERY_TYPE enum values are tested");
6058

Graphics/GraphicsEngineD3DBase/include/D3DTypeConversionImpl.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,10 @@ D3D_FILTER FilterTypeToD3DFilter(FILTER_TYPE MinFilter, FILTER_TYPE MagFilter, F
418418
{
419419
switch (MinFilter)
420420
{
421+
case FILTER_TYPE_UNKNOWN:
422+
DEV_ERROR("Filter type is not defined");
423+
break;
424+
421425
// Regular filters
422426
case FILTER_TYPE_POINT:
423427
if (MagFilter == FILTER_TYPE_POINT)
@@ -587,6 +591,10 @@ D3D_FILTER FilterTypeToD3DFilter(FILTER_TYPE MinFilter, FILTER_TYPE MagFilter, F
587591
"For maximum anisotropic filtering, all filters must be anisotropic");
588592
return D3D_FILTER_MAXIMUM_ANISOTROPIC;
589593
break;
594+
595+
case FILTER_TYPE_NUM_FILTERS:
596+
UNEXPECTED("This value does not define a valid filter type");
597+
break;
590598
}
591599

592600
UNEXPECTED("Unsupported filter combination");

Platforms/Win32/src/Win32FileSystem.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,6 @@ WindowsFile::WindowsFile(const FileOpenAttribs& OpenAttribs) :
238238
err == EMFILE) // Too many open files
239239
{
240240
// No more file descriptors are available: we have to wait
241-
//g_SystemMetricsStream << "Failed to open file " << FileName;
242-
//g_SystemMetricsStream << "\nWaiting 50 ms...\n";
243241
Sleep(50);
244242
continue;
245243
}

0 commit comments

Comments
 (0)