Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: native_client_sdk/src/examples/api/input_event/shared_queue.h

Issue 22842011: [NaCl SDK] Remove invalid assert from nacl_io. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: native_client_sdk/src/examples/api/input_event/shared_queue.h
diff --git a/native_client_sdk/src/examples/api/input_event/shared_queue.h b/native_client_sdk/src/examples/api/input_event/shared_queue.h
index b3c17845c61e3b5f52f0649de4efa6cbacb3c210..22a75bcc91eec7dd752646179ce21e47e96a6edb 100644
--- a/native_client_sdk/src/examples/api/input_event/shared_queue.h
+++ b/native_client_sdk/src/examples/api/input_event/shared_queue.h
@@ -52,6 +52,13 @@ class ScopedLock {
ScopedLock(const ScopedLock&);
};
+
+#ifdef __GNUC__
+#define UNUSED __attribute__ ((unused))
+#else
+#define UNUSED
+#endif
+
// LockingQueue contains a collection of <T>, such as a collection of
// objects or pointers. The Push() method is used to add items to the
// queue in a thread-safe manner. The GetItem() is used to retrieve
@@ -59,7 +66,8 @@ class ScopedLock {
template <class T> class LockingQueue {
public:
LockingQueue() : quit_(false) {
- int result = pthread_mutex_init(&queue_mutex_, NULL);
+ int result UNUSED;
+ result = pthread_mutex_init(&queue_mutex_, NULL);
assert(result == 0);
result = pthread_cond_init(&queue_condition_var_, NULL);
assert(result == 0);

Powered by Google App Engine
This is Rietveld 408576698