acrn-hypervisor/hypervisor/include
Junjie Mao c01a236efb treewide: fix declarations of functions with empty parameter lists
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>
2018-05-15 17:25:23 +08:00
..
arch/x86 treewide: fix declarations of functions with empty parameter lists 2018-05-15 17:25:23 +08:00
common UEFI: change the acrn boot flow on uefi platform 2018-05-15 17:19:39 +08:00
debug Remove STATIC_ASSERT Macro and replace with standard _Static_assert 2018-05-15 17:19:38 +08:00
lib treewide: fix declarations of functions with empty parameter lists 2018-05-15 17:25:23 +08:00
public trusty: implement hypercall to initialize trusty 2018-05-15 17:19:39 +08:00
hv_debug.h initial import 2018-05-11 14:44:28 +08:00
hv_lib.h Move s[n]printf to lib for release 2018-05-15 17:19:37 +08:00
hypervisor.h initial import 2018-05-11 14:44:28 +08:00