Add the relevent attributes in non-Linux wrapper code.
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: Icb2b71345f9e67fe5b10d96f883b1f599d2b6bb9
* This is not generic.
*/
static
-void *mremap_wrapper(void *old_address, size_t old_size,
- size_t new_size, int flags)
+void *mremap_wrapper(void *old_address __attribute__((unused)),
+ size_t old_size __attribute__((unused)),
+ size_t new_size __attribute__((unused)),
+ int flags)
{
assert(!(flags & MREMAP_MAYMOVE));
}
#else
static
-int set_thread_cpu_affinity(struct call_rcu_data *crdp)
+int set_thread_cpu_affinity(struct call_rcu_data *crdp __attribute__((unused)))
{
return 0;
}
return ret;
}
#else
-static int set_thread_cpu_affinity(struct urcu_workqueue *workqueue)
+static int set_thread_cpu_affinity(struct urcu_workqueue *workqueue __attribute__((unused)))
{
return 0;
}
}
}
+#ifdef HAVE_SCHED_SETAFFINITY
static void run_on(int cpu)
{
-#ifdef HAVE_SCHED_SETAFFINITY
cpu_set_t mask;
CPU_ZERO(&mask);
#else
sched_setaffinity(0, sizeof(mask), &mask);
#endif
-#endif /* HAVE_SCHED_SETAFFINITY */
}
+#else
+
+static void run_on(int cpu __attribute__((unused)))
+{}
+#endif /* HAVE_SCHED_SETAFFINITY */
/*
* timekeeping -- very crude -- should use MONOTONIC...
* Mainprogram.
*/
+static
+void usage(char *argv[]) __attribute__((noreturn));
+
static
void usage(char *argv[])
{