qemu-ppc
[Top][All Lists]
Advanced

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

[PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style


From: Philippe Mathieu-Daudé
Subject: [PATCH 01/21] hw/i386/pc: Do not use C99 mixed-declarations style
Date: Fri, 16 Feb 2024 12:02:52 +0100

QEMU's coding style generally forbids C99 mixed declarations.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/i386/pc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 196827531a..3c00a87317 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1227,6 +1227,7 @@ void pc_basic_device_init(struct PCMachineState *pcms,
      */
     if (pcms->hpet_enabled) {
         qemu_irq rtc_irq;
+        uint8_t compat;
 
         hpet = qdev_try_new(TYPE_HPET);
         if (!hpet) {
@@ -1238,8 +1239,7 @@ void pc_basic_device_init(struct PCMachineState *pcms,
          * use IRQ16~23, IRQ8 and IRQ2.  If the user has already set
          * the property, use whatever mask they specified.
          */
-        uint8_t compat = object_property_get_uint(OBJECT(hpet),
-                HPET_INTCAP, NULL);
+        compat = object_property_get_uint(OBJECT(hpet), HPET_INTCAP, NULL);
         if (!compat) {
             qdev_prop_set_uint32(hpet, HPET_INTCAP, hpet_irqs);
         }
-- 
2.41.0




reply via email to

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