qemu-ppc
[Top][All Lists]
Advanced

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

Re: [PATCH 4/8] spapr: Clean up local variable shadowing in spapr_init_c


From: Harsh Prateek Bora
Subject: Re: [PATCH 4/8] spapr: Clean up local variable shadowing in spapr_init_cpus()
Date: Tue, 19 Sep 2023 13:00:55 +0530
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0



On 9/18/23 20:28, Cédric Le Goater wrote:
Remove extra 'i' variable to fix this warning :

   ../hw/ppc/spapr.c: In function ‘spapr_init_cpus’:
   ../hw/ppc/spapr.c:2668:13: warning: declaration of ‘i’ shadows a previous 
local [-Wshadow=compatible-local]
    2668 |         int i;
         |             ^
   ../hw/ppc/spapr.c:2645:9: note: shadowed declaration is here
    2645 |     int i;
         |         ^

Signed-off-by: Cédric Le Goater <clg@kaod.org>

Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>

---
  hw/ppc/spapr.c | 2 --
  1 file changed, 2 deletions(-)

diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d89f0fd496b6..41ce7de77c14 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -2665,8 +2665,6 @@ static void spapr_init_cpus(SpaprMachineState *spapr)
      }
if (smc->pre_2_10_has_unused_icps) {
-        int i;
-
          for (i = 0; i < spapr_max_server_number(spapr); i++) {
              /* Dummy entries get deregistered when real ICPState objects
               * are registered during CPU core hotplug.



reply via email to

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