Patchwork [v3] -Wall fixes

login
register
mail settings
Submitter Paolo Carlini
Date Nov. 8, 2011, 12:35 p.m.
Message ID <4EB92228.8040702@oracle.com>
Download mbox | patch
Permalink /patch/124349/
State New
Headers show

Comments

Paolo Carlini - Nov. 8, 2011, 12:35 p.m.
Hi,

fix two minor regressions for the -Wall testsuite. Committed to mainline.

Paolo.

////////////////
2011-11-08  Paolo Carlini  <paolo.carlini@oracle.com>

	* testsuite/29_atomics/headers/atomic/macros.cc: Avoid -Wall
	warnings.
	* testsuite/29_atomics/atomic/cons/user_pod.cc: Likewise.

Patch

Index: testsuite/29_atomics/headers/atomic/macros.cc
===================================================================
--- testsuite/29_atomics/headers/atomic/macros.cc	(revision 181153)
+++ testsuite/29_atomics/headers/atomic/macros.cc	(working copy)
@@ -63,7 +63,7 @@ 
 
 extern void abort(void);
 
-main ()
+int main ()
 {
  if (ATOMIC_CHAR_LOCK_FREE != 0 && ATOMIC_CHAR_LOCK_FREE != 1
      && ATOMIC_CHAR_LOCK_FREE != 2)
Index: testsuite/29_atomics/atomic/cons/user_pod.cc
===================================================================
--- testsuite/29_atomics/atomic/cons/user_pod.cc	(revision 181153)
+++ testsuite/29_atomics/atomic/cons/user_pod.cc	(working copy)
@@ -29,7 +29,7 @@ 
 void atomics()
 {
   std::atomic<dwordp> a;
-  bool b = a.is_lock_free();
+  bool b __attribute__((unused)) = a.is_lock_free();
 }
 
 int main()