summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/scoped_cftyperef.h3
-rw-r--r--base/scoped_nsobject.h5
-rw-r--r--chrome/browser/cocoa/scoped_authorizationref.h3
3 files changed, 7 insertions, 4 deletions
diff --git a/base/scoped_cftyperef.h b/base/scoped_cftyperef.h
index 89a07de..908be24 100644
--- a/base/scoped_cftyperef.h
+++ b/base/scoped_cftyperef.h
@@ -7,6 +7,7 @@
#include <CoreFoundation/CoreFoundation.h>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
// scoped_cftyperef<> is patterned after scoped_ptr<>, but maintains ownership
// of a CoreFoundation object: any object that can be represented as a
@@ -63,7 +64,7 @@ class scoped_cftyperef {
// scoped_cftyperef<>::release() is like scoped_ptr<>::release. It is NOT
// a wrapper for CFRelease(). To force a scoped_cftyperef<> object to call
// CFRelease(), use scoped_cftyperef<>::reset().
- CFT release() {
+ CFT release() WARN_UNUSED_RESULT {
CFT temp = object_;
object_ = NULL;
return temp;
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;
diff --git a/chrome/browser/cocoa/scoped_authorizationref.h b/chrome/browser/cocoa/scoped_authorizationref.h
index 5e6cff2..7763f82 100644
--- a/chrome/browser/cocoa/scoped_authorizationref.h
+++ b/chrome/browser/cocoa/scoped_authorizationref.h
@@ -8,6 +8,7 @@
#include <Security/Authorization.h>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
// scoped_AuthorizationRef maintains ownership of an AuthorizationRef. It is
// patterned after the scoped_ptr interface.
@@ -63,7 +64,7 @@ class scoped_AuthorizationRef {
// NOT a wrapper for AuthorizationFree(). To force a
// scoped_AuthorizationRef object to call AuthorizationFree(), use
// scoped_AuthorizaitonRef::reset().
- AuthorizationRef release() {
+ AuthorizationRef release() WARN_UNUSED_RESULT {
AuthorizationRef temp = authorization_;
authorization_ = NULL;
return temp;