mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-05-02 05:34:04 +00:00
According to C99: The empty list in a function declarator that is not part of a definition of that function specifies that no information about the number or types of the parameters is supplied. This means gcc is happy with the following code, which is undesirable. void foo(); /* declaration with an empty parameter list */ void bar() { foo(); /* OK */ foo(1); /* OK */ foo(1, 2); /* OK */ } This patch fixes declarations of functions with empty parameter lists by adding an unnamed parameter of type void, which is the standard way to specify that a function has no parameters. The following coccinelle script is used. @@ type T; identifier f; @@ -T f(); +T f(void); New compilation errors are fixed accordingly. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com> |
||
---|---|---|
.. | ||
crypto | ||
bits.h | ||
errno.h | ||
list.h | ||
macros.h | ||
mem_mgt.h | ||
rtl.h | ||
spinlock.h | ||
sprintf.h | ||
stdarg.h | ||
strtol.h | ||
types.h | ||
util.h |