]> xenbits.xensource.com Git - xen.git/commitdiff
xen/x86: Remove the use of K&R functions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 17 Jul 2023 07:32:07 +0000 (09:32 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Jul 2023 07:32:07 +0000 (09:32 +0200)
Clang-15 (as seen in the FreeBSD 14 tests) complains:

  arch/x86/time.c:1364:20: error: a function declaration without a
  prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
  s_time_t get_s_time()
                     ^
                      void

The error message is a bit confusing but appears to new as part of
-Wdeprecated-non-prototype which is part of supporting C2x which formally
removes K&R syntax.

Either way, fix the identified functions.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 22b2fa4766728c3057757c00e79da5f7803fff33
master date: 2023-02-17 11:01:54 +0000

xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/time.c
xen/drivers/passthrough/iommu.c

index 7912053bda8c7e9bcc4b94574d54b738f00299c5..bcbecc6945854edf36cc23f3d0d0309e9646c596 100644 (file)
@@ -782,7 +782,7 @@ static int _vmx_cpu_up(bool bsp)
     return 0;
 }
 
-int cf_check vmx_cpu_up()
+int cf_check vmx_cpu_up(void)
 {
     return _vmx_cpu_up(false);
 }
index d882b43cf0715f9556f7e60dcc3e3fedec77e58c..b664ae4c835cd893fc4e981cac18ebb82fca7ee1 100644 (file)
@@ -1361,7 +1361,7 @@ s_time_t get_s_time_fixed(u64 at_tsc)
     return t->stamp.local_stime + scale_delta(delta, &t->tsc_scale);
 }
 
-s_time_t get_s_time()
+s_time_t get_s_time(void)
 {
     return get_s_time_fixed(0);
 }
index 5e2a720d29b922eb4290191640efc6a1159212b5..df803afb799c228137a685871e9af1383797223e 100644 (file)
@@ -598,7 +598,7 @@ int __init iommu_setup(void)
     return rc;
 }
 
-int iommu_suspend()
+int iommu_suspend(void)
 {
     if ( iommu_enabled )
         return iommu_call(iommu_get_ops(), suspend);
@@ -606,7 +606,7 @@ int iommu_suspend()
     return 0;
 }
 
-void iommu_resume()
+void iommu_resume(void)
 {
     if ( iommu_enabled )
         iommu_vcall(iommu_get_ops(), resume);