diff options
author | 2016-05-09 09:14:36 -0700 | |
---|---|---|
committer | 2016-05-09 09:14:36 -0700 | |
commit | 9daa4b92d73a1ae441c864a0ae73dda6c3397acb (patch) | |
tree | a353cef40d9d4254da6076213641612b818be6e1 /include | |
parent | 97a23369f870cc9a52ebe94c5d7d7bf443c9716d (diff) |
No error if function marked with SK_WARN_UNUSED_RESULT is used in SkAssertResult
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955263002
Review-Url: https://codereview.chromium.org/1955263002
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkTypes.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h index f99bb01949..b44df0de48 100644 --- a/include/core/SkTypes.h +++ b/include/core/SkTypes.h @@ -148,8 +148,9 @@ inline void operator delete(void* p) { #define SkDECLAREPARAM(type, var) #define SkPARAM(var) - // unlike SkASSERT, this guy executes its condition in the non-debug build - #define SkAssertResult(cond) cond + // unlike SkASSERT, this guy executes its condition in the non-debug build. + // It casts to void to allow use with functions declared with SK_WARN_RESULT_UNUSED. + #define SkAssertResult(cond) (void)(cond) #endif // Legacy macro names for SK_ABORT |