]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/x86: Remove the use of K&R functions
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 16 Feb 2023 22:14:12 +0000 (22:14 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 17 Feb 2023 11:01:54 +0000 (11:01 +0000)
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>
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/time.c
xen/drivers/passthrough/iommu.c

index 09edbd23b3990dd88994f716145da07778f29cd3..e1c268789e7e4d79ec3de98f3ab54c7363386de5 100644 (file)
@@ -781,7 +781,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 782b11c8a97ba5016dc5d464369f560324725542..4e44a43cc5e844afeb01cf2290cf9479569e4135 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 921b71e81904a60f5281a3b426fab38076e006ed..0e187f6ae33c4e211f9555d2f6f72b9266076f10 100644 (file)
@@ -606,7 +606,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);
@@ -614,7 +614,7 @@ int iommu_suspend()
     return 0;
 }
 
-void iommu_resume()
+void iommu_resume(void)
 {
     if ( iommu_enabled )
         iommu_vcall(iommu_get_ops(), resume);