mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
hw/i386/x86: Reduce init_topo_info() scope
This function is not used anywhere outside this file, so we can delete the prototype from include/hw/i386/x86.h and make the function "static void". This fixes when building with -Wall and using Clang ("Apple clang version 14.0.0 (clang-1400.0.29.202)"): ../hw/i386/x86.c:70:24: error: static function 'MACHINE' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] MachineState *ms = MACHINE(x86ms); ^ include/hw/i386/x86.h:101:1: note: use 'static' to give inline function 'init_topo_info' internal linkage void init_topo_info(X86CPUTopoInfo *topo_info, const X86MachineState *x86ms); ^ static include/hw/boards.h:24:49: note: 'MACHINE' declared here OBJECT_DECLARE_TYPE(MachineState, MachineClass, MACHINE) ^ Reported-by: Stefan Weil <sw@weilnetz.de> Suggested-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20221216220158.6317-6-philmd@linaro.org>
This commit is contained in:
parent
a371975ef6
commit
892afa04e6
2 changed files with 1 additions and 4 deletions
|
@ -64,7 +64,7 @@
|
|||
/* Physical Address of PVH entry point read from kernel ELF NOTE */
|
||||
static size_t pvh_start_addr;
|
||||
|
||||
inline void init_topo_info(X86CPUTopoInfo *topo_info,
|
||||
static void init_topo_info(X86CPUTopoInfo *topo_info,
|
||||
const X86MachineState *x86ms)
|
||||
{
|
||||
MachineState *ms = MACHINE(x86ms);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue