Reviewers: Benedikt Meurer,
Message:
Ceterum censeo V8_WARN_UNUSED_RESULT esse delendam.
Description:
Remove V8_WARN_UNUSED_RESULT for simple getters.
R=bmeu...@chromium.org
Please review this at https://codereview.chromium.org/23629031/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+16, -16 lines):
M src/cpu.h
M src/platform/condition-variable.h
M src/platform/elapsed-timer.h
M src/platform/mutex.h
M src/platform/semaphore.h
M src/platform/socket.h
Index: src/cpu.h
diff --git a/src/cpu.h b/src/cpu.h
index
58c7f5d9d4a8b8610eaca8c00e7c8866c3d99931..b2e9f7da7ee539581965f7e7991951ee420678b5
100644
--- a/src/cpu.h
+++ b/src/cpu.h
@@ -100,7 +100,7 @@ class CPU V8_FINAL BASE_EMBEDDED {
bool has_vfp3_d32() const { return has_vfp3_d32_; }
// Returns the number of processors online.
- static int NumberOfProcessorsOnline() V8_WARN_UNUSED_RESULT;
+ static int NumberOfProcessorsOnline();
// Initializes the cpu architecture support. Called once at VM startup.
static void SetUp();
Index: src/platform/condition-variable.h
diff --git a/src/platform/condition-variable.h
b/src/platform/condition-variable.h
index
43cc529deb510777f51c0bfc7f2f5feb9afef374..4d8a88aee79f084289cb7e4861f4a887f1690c43
100644
--- a/src/platform/condition-variable.h
+++ b/src/platform/condition-variable.h
@@ -105,10 +105,10 @@ class ConditionVariable V8_FINAL {
};
#endif
- NativeHandle& native_handle() V8_WARN_UNUSED_RESULT {
+ NativeHandle& native_handle() {
return native_handle_;
}
- const NativeHandle& native_handle() const V8_WARN_UNUSED_RESULT {
+ const NativeHandle& native_handle() const {
return native_handle_;
}
Index: src/platform/elapsed-timer.h
diff --git a/src/platform/elapsed-timer.h b/src/platform/elapsed-timer.h
index
773abbc8aacc8b1096fd00a06f1a5743c5fb88fd..8044bd084eb526930dfd13e3c06f75352c59165b
100644
--- a/src/platform/elapsed-timer.h
+++ b/src/platform/elapsed-timer.h
@@ -87,7 +87,7 @@ class ElapsedTimer V8_FINAL BASE_EMBEDDED {
// Returns the time elapsed since the previous start. This method may
only
// be called on a previously started timer.
- TimeDelta Elapsed() const V8_WARN_UNUSED_RESULT {
+ TimeDelta Elapsed() const {
ASSERT(IsStarted());
TimeDelta elapsed = Now() - start_ticks_;
ASSERT(elapsed.InMicroseconds() >= 0);
@@ -97,13 +97,13 @@ class ElapsedTimer V8_FINAL BASE_EMBEDDED {
// Returns |true| if the specified |time_delta| has elapsed since the
// previous start, or |false| if not. This method may only be called on
// a previously started timer.
- bool HasExpired(TimeDelta time_delta) const V8_WARN_UNUSED_RESULT {
+ bool HasExpired(TimeDelta time_delta) const {
ASSERT(IsStarted());
return Elapsed() >= time_delta;
}
private:
- V8_INLINE(static TimeTicks Now()) V8_WARN_UNUSED_RESULT {
+ V8_INLINE(static TimeTicks Now()) {
TimeTicks now = TimeTicks::HighResNow();
ASSERT(!now.IsNull());
return now;
Index: src/platform/mutex.h
diff --git a/src/platform/mutex.h b/src/platform/mutex.h
index
ff519b9f0832fe24cdb1ae8e861f7203fd0be957..f08de4f3dcb31e318bf858d0a0546feb4fde574a
100644
--- a/src/platform/mutex.h
+++ b/src/platform/mutex.h
@@ -81,10 +81,10 @@ class Mutex V8_FINAL {
typedef CRITICAL_SECTION NativeHandle;
#endif
- NativeHandle& native_handle() V8_WARN_UNUSED_RESULT {
+ NativeHandle& native_handle() {
return native_handle_;
}
- const NativeHandle& native_handle() const V8_WARN_UNUSED_RESULT {
+ const NativeHandle& native_handle() const {
return native_handle_;
}
@@ -177,10 +177,10 @@ class RecursiveMutex V8_FINAL {
// The implementation-defined native handle type.
typedef Mutex::NativeHandle NativeHandle;
- NativeHandle& native_handle() V8_WARN_UNUSED_RESULT {
+ NativeHandle& native_handle() {
return native_handle_;
}
- const NativeHandle& native_handle() const V8_WARN_UNUSED_RESULT {
+ const NativeHandle& native_handle() const {
return native_handle_;
}
Index: src/platform/semaphore.h
diff --git a/src/platform/semaphore.h b/src/platform/semaphore.h
index
221c7a337526c275b536ecc51901d1762b8c0f67..2cfa1421117748cff73c3cea9e347234fffb27b4
100644
--- a/src/platform/semaphore.h
+++ b/src/platform/semaphore.h
@@ -80,10 +80,10 @@ class Semaphore V8_FINAL {
typedef HANDLE NativeHandle;
#endif
- NativeHandle& native_handle() V8_WARN_UNUSED_RESULT {
+ NativeHandle& native_handle() {
return native_handle_;
}
- const NativeHandle& native_handle() const V8_WARN_UNUSED_RESULT {
+ const NativeHandle& native_handle() const {
return native_handle_;
}
Index: src/platform/socket.h
diff --git a/src/platform/socket.h b/src/platform/socket.h
index
6710692c544734cf882de92e13702686aed4e9e1..e9e2fa2eceb23395d8d348256ac20ad25a5aad8f
100644
--- a/src/platform/socket.h
+++ b/src/platform/socket.h
@@ -66,11 +66,11 @@ class Socket V8_FINAL {
// Set the value of the SO_REUSEADDR socket option.
bool SetReuseAddress(bool reuse_address);
- V8_INLINE(bool IsValid()) const V8_WARN_UNUSED_RESULT {
+ V8_INLINE(bool IsValid()) const {
return native_handle_ != kInvalidNativeHandle;
}
- static int GetLastError() V8_WARN_UNUSED_RESULT;
+ static int GetLastError();
// The implementation-defined native handle type.
#if V8_OS_POSIX
@@ -81,10 +81,10 @@ class Socket V8_FINAL {
static const NativeHandle kInvalidNativeHandle = INVALID_SOCKET;
#endif
- NativeHandle& native_handle() V8_WARN_UNUSED_RESULT {
+ NativeHandle& native_handle() {
return native_handle_;
}
- const NativeHandle& native_handle() const V8_WARN_UNUSED_RESULT {
+ const NativeHandle& native_handle() const {
return native_handle_;
}
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.