mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: try to avoid broken -Werror=duplicated-branches for old GCCs
This commit is contained in:
parent
cb942d7e81
commit
868947cbb4
@ -989,7 +989,6 @@ qboolean Delta_CompareField( delta_t *pField, void *from, void *to, float timeba
|
|||||||
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
fromF = Delta_ClampIntegerField( pField, fromF, bSigned, pField->bits );
|
fromF = Delta_ClampIntegerField( pField, fromF, bSigned, pField->bits );
|
||||||
toF = Delta_ClampIntegerField( pField, toF, bSigned, pField->bits );
|
toF = Delta_ClampIntegerField( pField, toF, bSigned, pField->bits );
|
||||||
if( pField->multiplier != 1.0f ) fromF *= pField->multiplier;
|
if( pField->multiplier != 1.0f ) fromF *= pField->multiplier;
|
||||||
@ -1254,6 +1253,10 @@ qboolean Delta_ReadField( sizebuf_t *msg, delta_t *pField, void *from, void *to,
|
|||||||
}
|
}
|
||||||
else if( pField->flags & DT_INTEGER )
|
else if( pField->flags & DT_INTEGER )
|
||||||
{
|
{
|
||||||
|
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wduplicated-branches"
|
||||||
|
#endif
|
||||||
if( bChanged )
|
if( bChanged )
|
||||||
{
|
{
|
||||||
iValue = MSG_ReadBitLong( msg, pField->bits, bSigned );
|
iValue = MSG_ReadBitLong( msg, pField->bits, bSigned );
|
||||||
@ -1270,6 +1273,9 @@ qboolean Delta_ReadField( sizebuf_t *msg, delta_t *pField, void *from, void *to,
|
|||||||
*(int32_t *)((uint8_t *)to + pField->offset ) = iValue;
|
*(int32_t *)((uint8_t *)to + pField->offset ) = iValue;
|
||||||
else
|
else
|
||||||
*(uint32_t *)((uint8_t *)to + pField->offset ) = iValue;
|
*(uint32_t *)((uint8_t *)to + pField->offset ) = iValue;
|
||||||
|
#if defined __GNUC__ && __GNUC_MAJOR < 9 && !defined __clang__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if( pField->flags & DT_FLOAT )
|
else if( pField->flags & DT_FLOAT )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user