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:
@ -118,7 +118,7 @@ class SwapQueue {
|
||||
// When specified, the T given in *input must pass the ItemVerifier() test.
|
||||
// The contents of *input after the call are then also guaranteed to pass the
|
||||
// ItemVerifier() test.
|
||||
bool Insert(T* input) WARN_UNUSED_RESULT {
|
||||
bool Insert(T* input) RTC_WARN_UNUSED_RESULT {
|
||||
RTC_DCHECK(input);
|
||||
|
||||
rtc::CritScope cs(&crit_queue_);
|
||||
@ -151,7 +151,7 @@ class SwapQueue {
|
||||
// empty). When specified, The T given in *output must pass the ItemVerifier()
|
||||
// test and the contents of *output after the call are then also guaranteed to
|
||||
// pass the ItemVerifier() test.
|
||||
bool Remove(T* output) WARN_UNUSED_RESULT {
|
||||
bool Remove(T* output) RTC_WARN_UNUSED_RESULT {
|
||||
RTC_DCHECK(output);
|
||||
|
||||
rtc::CritScope cs(&crit_queue_);
|
||||
|
||||
Reference in New Issue
Block a user