summaryrefslogtreecommitdiffstats
path: root/include/UniquePtr.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/UniquePtr.h')
-rw-r--r--include/UniquePtr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/UniquePtr.h b/include/UniquePtr.h
index f5c7c2c..31db377 100644
--- a/include/UniquePtr.h
+++ b/include/UniquePtr.h
@@ -64,7 +64,7 @@ public:
// Returns the raw pointer and hands over ownership to the caller.
// The pointer will not be deleted by UniquePtr.
- T* release() {
+ T* release() __attribute__((warn_unused_result)) {
T* result = mPtr;
mPtr = NULL;
return result;
@@ -110,7 +110,7 @@ public:
}
T* get() const { return mPtr; }
- T* release() {
+ T* release() __attribute__((warn_unused_result)) {
T* result = mPtr;
mPtr = NULL;
return result;