Make WARN_UNUSED_RESULT a no-op on gcc

Because on gcc, cast to void doesn't silence the warning. See
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66425

Also add an RTC_ prefix to the macro instead of only defining it if it
wasn't already defined, to ensure that we always get our own version.

BUG=none

Review-Url: https://codereview.webrtc.org/2797983003
Cr-Commit-Position: refs/heads/master@{#17563}
This commit is contained in:
kwiberg
2017-04-06 04:32:27 -07:00
committed by Commit bot
parent 177b17e050
commit 388fe425c7
6 changed files with 16 additions and 15 deletions

View File

@ -34,6 +34,6 @@ bool WebRtcIlbcfix_CbConstruct(
int16_t* mem, /* (i) Buffer for codevector construction */
size_t lMem, /* (i) Length of buffer */
size_t veclen /* (i) Length of vector */
) WARN_UNUSED_RESULT;
) RTC_WARN_UNUSED_RESULT;
#endif

View File

@ -33,6 +33,6 @@ int WebRtcIlbcfix_DecodeImpl(
structure */
int16_t mode /* (i) 0: bad packet, PLC,
1: normal */
) WARN_UNUSED_RESULT;
) RTC_WARN_UNUSED_RESULT;
#endif

View File

@ -35,6 +35,6 @@ bool WebRtcIlbcfix_DecodeResidual(
int16_t* decresidual, /* (o) decoded residual frame */
int16_t* syntdenum /* (i) the decoded synthesis filter
coefficients */
) WARN_UNUSED_RESULT;
) RTC_WARN_UNUSED_RESULT;
#endif

View File

@ -31,6 +31,6 @@ bool WebRtcIlbcfix_GetCbVec(
size_t index, /* (i) Codebook index */
size_t lMem, /* (i) Length of codebook buffer */
size_t cbveclen /* (i) Codebook vector length */
) WARN_UNUSED_RESULT;
) RTC_WARN_UNUSED_RESULT;
#endif