Skip to content
Snippets Groups Projects
  • Philippe Mathieu-Daudé's avatar
    3c55dd58
    hw/cpu: Clean up global variable shadowing · 3c55dd58
    Philippe Mathieu-Daudé authored
    
    Fix:
    
      hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          const CPUArchId *cpus = possible_cpus->cpus;
                           ^
      hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          uint16List *cpus = NULL;
                      ^
      hw/acpi/aml-build.c:2005:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          CPUArchIdList *cpus = ms->possible_cpus;
                         ^
      hw/core/machine-smp.c:77:14: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          unsigned cpus    = config->has_cpus ? config->cpus : 0;
                   ^
      include/hw/core/cpu.h:589:17: note: previous declaration is here
      extern CPUTailQ cpus;
                      ^
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: default avatarAni Sinha <anisinha@redhat.com>
    Message-Id: <20231010115048.11856-2-philmd@linaro.org>
    3c55dd58
    History
    hw/cpu: Clean up global variable shadowing
    Philippe Mathieu-Daudé authored
    
    Fix:
    
      hw/core/machine.c:1302:22: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          const CPUArchId *cpus = possible_cpus->cpus;
                           ^
      hw/core/numa.c:69:17: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          uint16List *cpus = NULL;
                      ^
      hw/acpi/aml-build.c:2005:20: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          CPUArchIdList *cpus = ms->possible_cpus;
                         ^
      hw/core/machine-smp.c:77:14: error: declaration shadows a variable in the global scope [-Werror,-Wshadow]
          unsigned cpus    = config->has_cpus ? config->cpus : 0;
                   ^
      include/hw/core/cpu.h:589:17: note: previous declaration is here
      extern CPUTailQ cpus;
                      ^
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
    Reviewed-by: default avatarAni Sinha <anisinha@redhat.com>
    Message-Id: <20231010115048.11856-2-philmd@linaro.org>