Tests fix: unused variable warnings
[urcu.git] / tests / benchmark / test_urcu_lfs_rcu.c
index 1ec7be43e3e30d069e064c4d8e14b1624d0b35a2..9e0bfad44a9adfb98376b0097b662bb2dc4cba49 100644 (file)
@@ -21,8 +21,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#define _GNU_SOURCE
-#include "config.h"
 #include <stdio.h>
 #include <pthread.h>
 #include <stdlib.h>
@@ -85,9 +83,10 @@ pthread_mutex_t affinity_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void set_affinity(void)
 {
+#if HAVE_SCHED_SETAFFINITY
        cpu_set_t mask;
-       int cpu;
-       int ret;
+       int cpu, ret;
+#endif /* HAVE_SCHED_SETAFFINITY */
 
        if (!use_affinity)
                return;
@@ -382,8 +381,10 @@ int main(int argc, char **argv)
 
        for (i = 0; i < duration; i++) {
                sleep(1);
-               if (verbose_mode)
-                       (void) write(1, ".", 1);
+               if (verbose_mode) {
+                       fwrite(".", sizeof(char), 1, stdout);
+                       fflush(stdout);
+               }
        }
 
        test_stop = 1;
This page took 0.022996 seconds and 4 git commands to generate.