Preceding a method call with (void)
Kevin Wilson
wkevils at gmail.com
Thu Sep 10 00:52:49 EDT 2015
Hi all,
I intend to send a patch to the kernel, and my question is about
preceding a method with (void).
In several OpenSource UserSpace projects, I encountered usage of
preceding a method invocation with (void).
For example:
(void) myFunc(param1);
I did not encounter such cases in the kernel code that I read, thus far.
On the other hand, I did not saw in the kernel coding style doc
anything which prohibits such usage.
If I remember, using (void) before the method name is a way to tell
explicitly that this method does not return any value,
but I am not sure as for the exact reasons it is used (in userspace).
My question is:
Will sending a patch to the kernel with code with (void) preceding
method calls make sense ?
or should I avoid it in the first place (again, I did not saw such a
pattern in the kernel)
Regards,
Kevin
More information about the Kernelnewbies
mailing list