mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 13:18:04 +02:00
gallium/tessellator: Fix warning suppression
Single-line version of MSVC warning suppression does not extend beyond the #endif directive. Use push/disable/pop instead. Also suppress 26452, which is a similar analysis warning. This could also be fixed with constexpr if, but C++17 would be required. Fixes:790516db0b("gallium/swr: fix gcc warnings") Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8093> (cherry picked from commit3c7062417b)
This commit is contained in:
parent
cdebbc1846
commit
b913f2b097
2 changed files with 11 additions and 3 deletions
|
|
@ -1381,7 +1381,7 @@
|
|||
"description": "gallium/tessellator: Fix warning suppression",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"master_sha": null,
|
||||
"because_sha": "790516db0bfc056df0290c42565214d4148e901a"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -194,9 +194,13 @@ INT32 floatToIDotF( const float& input )
|
|||
{
|
||||
// assert( iShift < 32 );
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( suppress : 4293 )
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4293 26452 )
|
||||
#endif
|
||||
_fxpMaxPosValueFloat -= INT32( 1 ) << iShift;
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
}
|
||||
|
||||
// The maximum negative fixed point value is -2^(i-1).
|
||||
|
|
@ -216,9 +220,13 @@ INT32 floatToIDotF( const float& input )
|
|||
{
|
||||
// assert( iShift < 32 );
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( suppress : 4293 )
|
||||
#pragma warning( push )
|
||||
#pragma warning( disable : 4293 26452 )
|
||||
#endif
|
||||
_fxpMaxPosValueFloat -= INT32( 1 ) << iShift;
|
||||
#if defined(_MSC_VER)
|
||||
#pragma warning( pop )
|
||||
#endif
|
||||
}
|
||||
|
||||
// The maximum negative fixed point value is 0.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue