Thread (5 messages) 5 messages, 4 authors, 2015-09-18

Preceding a method call with (void)

From: Kevin Wilson <hidden>
Date: 2015-09-10 04:52:49

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help