qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] hw/i386/x86: Reduce init_topo_info() scope


From: Richard Henderson
Subject: Re: [PATCH 5/5] hw/i386/x86: Reduce init_topo_info() scope
Date: Fri, 16 Dec 2022 16:25:23 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 12/16/22 14:01, Philippe Mathieu-Daudé wrote:
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>
---
  hw/i386/x86.c         | 2 +-
  include/hw/i386/x86.h | 3 ---
  2 files changed, 1 insertion(+), 4 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]