From: Mathieu Desnoyers Date: Wed, 29 Jun 2011 17:29:38 +0000 (-0400) Subject: call_rcu: per_cpu_call_rcu_data should be non-const X-Git-Tag: v0.6.4~15 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=f943709861a18d5b473d453e039ed7c433352a76;p=urcu.git call_rcu: per_cpu_call_rcu_data should be non-const On FreeBSD: In file included from urcu.c:438: urcu-call-rcu-impl.h: In function 'get_cpu_call_rcu_data_mb': urcu-call-rcu-impl.h:325: warning: return discards qualifiers from pointer target type Signed-off-by: Mathieu Desnoyers --- diff --git a/urcu-call-rcu-impl.h b/urcu-call-rcu-impl.h index d5baa69..b9e57cd 100644 --- a/urcu-call-rcu-impl.h +++ b/urcu-call-rcu-impl.h @@ -115,7 +115,12 @@ static void alloc_cpu_call_rcu_data(void) #else /* #if defined(HAVE_SCHED_GETCPU) && defined(HAVE_SYSCONF) */ -static const struct call_rcu_data **per_cpu_call_rcu_data = NULL; +/* + * per_cpu_call_rcu_data should be constant, but some functions below, used both + * for cases where cpu number is available and not available, assume it it not + * constant. + */ +static struct call_rcu_data **per_cpu_call_rcu_data = NULL; static const long maxcpus = -1; static void alloc_cpu_call_rcu_data(void)