xen/x86: Remove the use of K&R functions

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>
This commit is contained in:
Andrew Cooper committed 2023-02-17 11:01:54 +00:00
1 parent f5c1a6374a
commit 22b2fa4766
3 files changed
+4 -4

No files matched your search

+1 -1
View 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);
}
+1 -1
View 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);
}
+2 -2
View 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);
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.