Bug 1435695 - WebRTC fails to build with GCC 8; r=dminor

--HG--
extra : rebase_source : d26e183b2082fa4f88ce3b837e2db5fc8acbff5b
This commit is contained in:
Robert-André Mauchin 2018-02-05 09:46:44 -05:00
parent c468654fc8
commit 38a3ee1f79
2 changed files with 6 additions and 4 deletions

View File

@ -115,8 +115,9 @@ static int32_t WeightedAverage(int16_t* data, int16_t offset,
// undefined behavior, so not a good idea; this just makes UBSan ignore the
// violation, so that our old code can continue to do what it's always been
// doing.)
static inline int32_t OverflowingMulS16ByS32ToS32(int16_t a, int32_t b)
RTC_NO_SANITIZE("signed-integer-overflow") {
static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow")
OverflowingMulS16ByS32ToS32(int16_t a, int32_t b)
{
return a * b;
}

View File

@ -209,8 +209,9 @@ void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef,
// Left shift of an int32_t that's allowed to overflow. (It's still undefined
// behavior, so not a good idea; this just makes UBSan ignore the violation, so
// that our old code can continue to do what it's always been doing.)
static inline int32_t OverflowingLShiftS32(int32_t x, int shift)
RTC_NO_SANITIZE("shift") {
static inline int32_t RTC_NO_SANITIZE("shift")
OverflowingLShiftS32(int32_t x, int shift)
{
return x << shift;
}