This makes the code compilable with the compiler flags -Wstrict-prototypes and -Wmissing-prototypes. Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx> --- x86/cmpxchg8b.c | 2 +- x86/tsc.c | 4 ++-- x86/umip.c | 6 +++--- x86/vmx.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x86/cmpxchg8b.c b/x86/cmpxchg8b.c index 2e5a8e6..c56d295 100644 --- a/x86/cmpxchg8b.c +++ b/x86/cmpxchg8b.c @@ -17,7 +17,7 @@ static void test_cmpxchg8b(u32 *mem) report("cmpxchg8b", mem[0] == 3 && mem[1] == 4); } -int main() +int main(void) { setup_vm(); setup_idt(); diff --git a/x86/tsc.c b/x86/tsc.c index f841f03..6480a9c 100644 --- a/x86/tsc.c +++ b/x86/tsc.c @@ -8,7 +8,7 @@ static int check_cpuid_80000001_edx(unsigned int bit) } #define CPUID_7_0_ECX_RDPID (1 << 22) -int check_cpuid_7_0_ecx(unsigned int bit) +static int check_cpuid_7_0_ecx(unsigned int bit) { return (cpuid_indexed(7, 0).c & bit) != 0; } @@ -31,7 +31,7 @@ static void test_rdtscp(u64 aux) report("Test RDTSCP %" PRIu64, ecx == aux, aux); } -void test_rdpid(u64 aux) +static void test_rdpid(u64 aux) { u32 eax; diff --git a/x86/umip.c b/x86/umip.c index 149472d..5da6793 100644 --- a/x86/umip.c +++ b/x86/umip.c @@ -13,7 +13,7 @@ static unsigned long expected_rip; static int skip_count; static volatile int gp_count; -void gp_handler(struct ex_regs *regs) +static void gp_handler(struct ex_regs *regs) { if (regs->rip == expected_rip) { gp_count++; @@ -116,7 +116,7 @@ static void test_umip_gp(const char *msg) /* The ugly mode switching code */ -int do_ring3(void (*fn)(const char *), const char *arg) +static int do_ring3(void (*fn)(const char *), const char *arg) { static unsigned char user_stack[4096]; int ret; @@ -171,7 +171,7 @@ int do_ring3(void (*fn)(const char *), const char *arg) return ret; } -int main() +int main(void) { extern unsigned char kernel_entry; diff --git a/x86/vmx.c b/x86/vmx.c index b74ce6a..79a21d8 100644 --- a/x86/vmx.c +++ b/x86/vmx.c @@ -335,7 +335,7 @@ static bool check_all_vmcs_fields(u8 cookie) return pass; } -void test_vmwrite_vmread(void) +static void test_vmwrite_vmread(void) { struct vmcs *vmcs = alloc_page(); @@ -351,7 +351,7 @@ void test_vmwrite_vmread(void) free_page(vmcs); } -void test_vmcs_high(void) +static void test_vmcs_high(void) { struct vmcs *vmcs = alloc_page(); @@ -375,7 +375,7 @@ void test_vmcs_high(void) free_page(vmcs); } -void test_vmcs_lifecycle(void) +static void test_vmcs_lifecycle(void) { struct vmcs *vmcs[2] = {}; int i; -- 1.8.3.1