diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-24 15:12:43 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-05-24 15:12:43 +0000 |
commit | fb6d3aba33356ebf5767bfcffd3354f373a48f37 (patch) | |
tree | f28fcb4942ce378700699531a5f0386c9235732e /base/scoped_nsobject.h | |
parent | c799ccc53a45cb514170f00c3d4dd2e2a435394f (diff) | |
download | chromium_src-fb6d3aba33356ebf5767bfcffd3354f373a48f37.zip chromium_src-fb6d3aba33356ebf5767bfcffd3354f373a48f37.tar.gz chromium_src-fb6d3aba33356ebf5767bfcffd3354f373a48f37.tar.bz2 |
Add unused return warnings to the release() methods of some scoped Mac objects
BUG=43608
TEST=None
Review URL: http://codereview.chromium.org/2083021
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/scoped_nsobject.h')
-rw-r--r-- | base/scoped_nsobject.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/base/scoped_nsobject.h b/base/scoped_nsobject.h index cc6f7bf..bde2753 100644 --- a/base/scoped_nsobject.h +++ b/base/scoped_nsobject.h @@ -7,6 +7,7 @@ #import <Foundation/Foundation.h> #include "base/basictypes.h" +#include "base/compiler_specific.h" // scoped_nsobject<> is patterned after scoped_ptr<>, but maintains ownership // of an NSObject subclass object. Style deviations here are solely for @@ -72,7 +73,7 @@ class scoped_nsobject { // scoped_nsobject<>::release() is like scoped_ptr<>::release. It is NOT // a wrapper for [object_ release]. To force a scoped_nsobject<> object to // call [object_ release], use scoped_nsobject<>::reset(). - NST* release() { + NST* release() WARN_UNUSED_RESULT { NST* temp = object_; object_ = nil; return temp; @@ -133,7 +134,7 @@ class scoped_nsobject<id> { // scoped_nsobject<>::release() is like scoped_ptr<>::release. It is NOT // a wrapper for [object_ release]. To force a scoped_nsobject<> object to // call [object_ release], use scoped_nsobject<>::reset(). - id release() { + id release() WARN_UNUSED_RESULT { id temp = object_; object_ = nil; return temp; |