Put attribute before function name instead of after, as required by GCC

As suggested by marxin.liska@gmail.com in bug 7857.

BUG=webrtc:7857

Review-Url: https://codereview.webrtc.org/2947383002
Cr-Commit-Position: refs/heads/master@{#18757}
This commit is contained in:
kwiberg
2017-06-26 01:32:40 -07:00
committed by Commit Bot
parent 93ecc5dad0
commit d3cf0476b4
3 changed files with 10 additions and 10 deletions

View File

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

View File

@ -193,16 +193,16 @@ static void CalcCorrelation(int32_t *PSpecQ12, int32_t *CorrQ7)
// undefined behavior, so not a good idea; this just makes UBSan ignore the // undefined behavior, so not a good idea; this just makes UBSan ignore the
// violations, so that our old code can continue to do what it's always been // violations, so that our old code can continue to do what it's always been
// doing.) // doing.)
static inline int32_t OverflowingMulS16S32ToS32(int16_t a, int32_t b) static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow")
RTC_NO_SANITIZE("signed-integer-overflow") { OverflowingMulS16S32ToS32(int16_t a, int32_t b) {
return a * b; return a * b;
} }
static inline int32_t OverflowingAddS32S32ToS32(int32_t a, int32_t b) static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow")
RTC_NO_SANITIZE("signed-integer-overflow") { OverflowingAddS32S32ToS32(int32_t a, int32_t b) {
return a + b; return a + b;
} }
static inline int32_t OverflowingSubS32S32ToS32(int32_t a, int32_t b) static inline int32_t RTC_NO_SANITIZE("signed-integer-overflow")
RTC_NO_SANITIZE("signed-integer-overflow") { OverflowingSubS32S32ToS32(int32_t a, int32_t b) {
return a - b; return a - b;
} }

View File

@ -209,8 +209,8 @@ void WebRtcIsacfix_NormLatticeFilterMa(size_t orderCoef,
// Left shift of an int32_t that's allowed to overflow. (It's still undefined // 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 // 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.) // that our old code can continue to do what it's always been doing.)
static inline int32_t OverflowingLShiftS32(int32_t x, int shift) static inline int32_t RTC_NO_SANITIZE("shift")
RTC_NO_SANITIZE("shift") { OverflowingLShiftS32(int32_t x, int shift) {
return x << shift; return x << shift;
} }