Enabled C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch

This commit is contained in:
Branimir Karadžić
2014-06-14 18:11:26 -07:00
parent 0bca2eba02
commit c756b5f273
3 changed files with 7 additions and 6 deletions

View File

@@ -67,7 +67,7 @@ namespace bx
const float4_t tmp0 = float4_or(_a, zwxy);
const float4_t tmp1 = float4_swiz_yyyy(_a);
const float4_t tmp2 = float4_or(tmp0, tmp1);
const float4_t mf000 = float4_ild(-1, 0, 0, 0);
const float4_t mf000 = float4_ild(UINT32_MAX, 0, 0, 0);
const float4_t result = float4_and(tmp2, mf000);
return result;
@@ -76,7 +76,7 @@ namespace bx
BX_FLOAT4_INLINE float4_t float4_orc_ni(float4_t _a, float4_t _b)
{
const float4_t aorb = float4_or(_a, _b);
const float4_t mffff = float4_isplat(-1);
const float4_t mffff = float4_isplat(UINT32_MAX);
const float4_t result = float4_xor(aorb, mffff);
return result;
@@ -109,7 +109,7 @@ namespace bx
BX_FLOAT4_INLINE float4_t float4_not_ni(float4_t _a)
{
const float4_t mffff = float4_isplat(-1);
const float4_t mffff = float4_isplat(UINT32_MAX);
const float4_t result = float4_xor(_a, mffff);
return result;

View File

@@ -188,7 +188,8 @@
//# pragma warning(error:4127) // ENABLE warning C4127: conditional expression is constant
# pragma warning(error:4130) // ENABLE warning C4130: 'operator' : logical operation on address of string constant
# pragma warning(error:4239) // ENABLE warning C4239: nonstandard extension used : 'argument' : conversion from '*' to '* &' A non-const reference may only be bound to an lvalue
//# pragma warning(error:4244) // ENABLE warning C4244: 'conversion' conversion from 'type1' to 'type2', possible loss of data
//# pragma warning(error:4244) // ENABLE warning C4244: 'argument' : conversion from 'type1' to 'type2', possible loss of data
# pragma warning(error:4245) // ENABLE warning C4245: 'conversion' : conversion from 'type1' to 'type2', signed/unsigned mismatch
# pragma warning(error:4263) // ENABLE warning C4263: 'function' : member function does not override any base class virtual member function
# pragma warning(error:4265) // ENABLE warning C4265: class has virtual functions, but destructor is not virtual
# pragma warning(error:4431) // ENABLE warning C4431: missing type specifier - int assumed. Note: C no longer supports default-int

View File

@@ -225,7 +225,7 @@ namespace bx
inline int32_t vsnprintf(char* _str, size_t _count, const char* _format, va_list _argList)
{
#if BX_COMPILER_MSVC
int32_t len = ::vsnprintf_s(_str, _count, -1, _format, _argList);
int32_t len = ::vsnprintf_s(_str, _count, size_t(-1), _format, _argList);
return -1 == len ? ::_vscprintf(_format, _argList) : len;
#else
return ::vsnprintf(_str, _count, _format, _argList);
@@ -238,7 +238,7 @@ namespace bx
inline int32_t vsnwprintf(wchar_t* _str, size_t _count, const wchar_t* _format, va_list _argList)
{
#if BX_COMPILER_MSVC
int32_t len = ::_vsnwprintf_s(_str, _count, -1, _format, _argList);
int32_t len = ::_vsnwprintf_s(_str, _count, size_t(-1), _format, _argList);
return -1 == len ? ::_vscwprintf(_format, _argList) : len;
#elif defined(__MINGW32__)
return ::vsnwprintf(_str, _count, _format, _argList);