Fixed clang warning.
This commit is contained in:
parent
b41446d4a3
commit
f5d9c28f03
5
3rdparty/freetype/freetype.h
vendored
5
3rdparty/freetype/freetype.h
vendored
@ -1,6 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER) && !defined(__clang__)
|
||||||
# pragma warning(push)
|
# pragma warning(push)
|
||||||
# pragma warning(disable: 4100) // DISABLE warning C4100: '' : unreferenced formal parameter
|
# pragma warning(disable: 4100) // DISABLE warning C4100: '' : unreferenced formal parameter
|
||||||
# pragma warning(disable: 4146) // DISABLE warning C4146: unary minus operator applied to unsigned type, result still unsigned
|
# pragma warning(disable: 4146) // DISABLE warning C4146: unary minus operator applied to unsigned type, result still unsigned
|
||||||
@ -10,6 +10,9 @@
|
|||||||
# pragma warning(disable: 4701) // DISABLE warning C4701: potentially uninitialized local variable '' used
|
# pragma warning(disable: 4701) // DISABLE warning C4701: potentially uninitialized local variable '' used
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
# pragma GCC system_header
|
# pragma GCC system_header
|
||||||
|
#elif defined(__clang__)
|
||||||
|
# pragma clang diagnostic ignored "-Wshift-negative-value"
|
||||||
|
# pragma clang diagnostic ignored "-Wuninitialized"
|
||||||
#endif // defined(__GNUC__)
|
#endif // defined(__GNUC__)
|
||||||
|
|
||||||
/***************************************************************************/
|
/***************************************************************************/
|
||||||
|
@ -37,6 +37,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
|||||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
||||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers");
|
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wmissing-field-initializers");
|
||||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow");
|
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wshadow");
|
||||||
|
BX_PRAGMA_DIAGNOSTIC_IGNORED_CLANG_GCC("-Wint-to-pointer-cast")
|
||||||
#define STB_IMAGE_IMPLEMENTATION
|
#define STB_IMAGE_IMPLEMENTATION
|
||||||
#include <stb/stb_image.c>
|
#include <stb/stb_image.c>
|
||||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||||
|
@ -4583,8 +4583,8 @@ data.NumQualityLevels = 0;
|
|||||||
box.bottom = blit.m_srcY + height;;
|
box.bottom = blit.m_srcY + height;;
|
||||||
box.back = blit.m_srcZ + bx::uint32_imax(1, depth);
|
box.back = blit.m_srcZ + bx::uint32_imax(1, depth);
|
||||||
|
|
||||||
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { 0 } };
|
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ 0 }} };
|
||||||
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { 0 } };
|
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ 0 }} };
|
||||||
m_commandList->CopyTextureRegion(&dstLocation
|
m_commandList->CopyTextureRegion(&dstLocation
|
||||||
, blit.m_dstX
|
, blit.m_dstX
|
||||||
, blit.m_dstY
|
, blit.m_dstY
|
||||||
@ -4612,8 +4612,8 @@ data.NumQualityLevels = 0;
|
|||||||
: 0
|
: 0
|
||||||
;
|
;
|
||||||
|
|
||||||
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { dstZ*dst.m_numMips+blit.m_dstMip } };
|
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ dstZ*dst.m_numMips+blit.m_dstMip }} };
|
||||||
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, { srcZ*src.m_numMips+blit.m_srcMip } };
|
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ srcZ*src.m_numMips+blit.m_srcMip }} };
|
||||||
bool depthStencil = isDepth(TextureFormat::Enum(src.m_textureFormat) );
|
bool depthStencil = isDepth(TextureFormat::Enum(src.m_textureFormat) );
|
||||||
m_commandList->CopyTextureRegion(&dstLocation
|
m_commandList->CopyTextureRegion(&dstLocation
|
||||||
, blit.m_dstX
|
, blit.m_dstX
|
||||||
|
Loading…
Reference in New Issue
Block a user