Skip to contentSkip to conversation

const qualifiers on function returns type

DISCUSSION Benoit Boissinot 1 participant 1 message Apr 9, 2005

lore
Share & tools
lore
#0 lore raw

Hi,

there are some function who are declared this way:

include/linux/cpuset.h:21
extern const cpumask_t cpuset_cpus_allowed(const struct task_struct *p);

I was wondering what means const for a function returns type. K&R doesn't say anything about this and gcc-4 warns (warning: type qualifiers ignored on function return type)

If it is a mistake, there are a few functions who should be modified.

Regards,

Benoit