Commit ba1f77c
x86/kvm: Fix compilation warning in non-x86_64 builds
On non-x86_64 builds, helpers gtod_is_based_on_tsc() and
kvm_guest_supported_xfd() are defined but never used. Because these are
static inline but are in a .c file, some compilers do warn for them with
-Wunused-function, which becomes an error if -Werror is present.
Add #ifdef so they are only defined in x86_64 builds.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leonardo Bras <leobras@redhat.com>
Message-Id: <20220218034100.115702-1-leobras@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>1 parent 988896b commit ba1f77c
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
989 | 989 | | |
990 | 990 | | |
991 | 991 | | |
| 992 | + | |
992 | 993 | | |
993 | 994 | | |
994 | 995 | | |
995 | 996 | | |
| 997 | + | |
996 | 998 | | |
997 | 999 | | |
998 | 1000 | | |
| |||
2361 | 2363 | | |
2362 | 2364 | | |
2363 | 2365 | | |
| 2366 | + | |
2364 | 2367 | | |
2365 | 2368 | | |
2366 | 2369 | | |
2367 | 2370 | | |
| 2371 | + | |
2368 | 2372 | | |
2369 | 2373 | | |
2370 | 2374 | | |
| |||
0 commit comments