Although we are not going to have a clang build any time
soon, those warnings generally make sense.

./src/hw/usb-ohci.c:192:13: warning: logical not is only applied to the left 
hand side of this bitwise operator [-Wlogical-not-parentheses]
  192 |         if (! status & OHCI_HCR)

./src/util.h:217:53: warning: attribute declaration must precede definition 
[-Wignored-attributes]
  217 | extern struct bios_config_table_s BIOS_CONFIG_TABLE __aligned(1);
      |                                                     ^
In file included from out/ccode32flat.o.tmp.c:83:
./src/hw/virtio-blk.c:56:9: warning: misleading indentation; statement is not 
part of the previous 'while' [-Wmisleading-indentation]
   56 |         vring_get_buf(vq, NULL);

Signed-off-by: Jiaxun Yang <jiaxun.y...@flygoat.com>
---
 src/hw/serialio.c    | 1 +
 src/hw/usb-ohci.c    | 2 +-
 src/hw/virtio-blk.c  | 2 +-
 src/std/LegacyBios.h | 4 +++-
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/hw/serialio.c b/src/hw/serialio.c
index 
fa663b9949191d930c395cea9498c103b0884027..985481ae52479879bd946616590c067502d799a4
 100644
--- a/src/hw/serialio.c
+++ b/src/hw/serialio.c
@@ -39,6 +39,7 @@ serial_debug_read(u8 offset)
         ASSERT32FLAT();
         return readb((void*)CONFIG_DEBUG_SERIAL_MEM_ADDRESS + 4*offset);
     }
+    return 0;
 }
 
 // Setup the debug serial port for output.
diff --git a/src/hw/usb-ohci.c b/src/hw/usb-ohci.c
index 
90f60e6452957552412d2aa9958f00141473437a..0fe8ea9e5d36468516e608305104da1e2129be70
 100644
--- a/src/hw/usb-ohci.c
+++ b/src/hw/usb-ohci.c
@@ -189,7 +189,7 @@ start_ohci(struct usb_ohci_s *cntl, struct ohci_hcca *hcca)
     writel(&cntl->regs->cmdstatus, OHCI_HCR);
     for (;;) {
         u32 status = readl(&cntl->regs->cmdstatus);
-        if (! status & OHCI_HCR)
+        if (!(status & OHCI_HCR))
             break;
         if (timer_check(end)) {
             warn_timeout();
diff --git a/src/hw/virtio-blk.c b/src/hw/virtio-blk.c
index 
137a2c3c75579beae69611e248002d48f947fdac..351692e22e6ebaf63626348e47a0f0533617325e
 100644
--- a/src/hw/virtio-blk.c
+++ b/src/hw/virtio-blk.c
@@ -53,7 +53,7 @@ virtio_blk_op_one_segment(struct virtiodrive_s *vdrive,
         usleep(5);
 
     /* Reclaim virtqueue element */
-        vring_get_buf(vq, NULL);
+    vring_get_buf(vq, NULL);
 
     /**
     ** Clear interrupt status register. Avoid leaving interrupts stuck
diff --git a/src/std/LegacyBios.h b/src/std/LegacyBios.h
index 
5170c37865fc573d54a06c8b1140a353721daec7..0f3f647bf0b1e5162353d6a2ca480d1f1c63bdae
 100644
--- a/src/std/LegacyBios.h
+++ b/src/std/LegacyBios.h
@@ -285,7 +285,7 @@ typedef enum {
   /// code is read/write.
   /// Input:
   ///   AX = Compatibility16PrepareToBoot
-  ///   ES:BX = Pointer to EFI_TO_COMPATIBILITY16_BOOT_TABLE structure  
+  ///   ES:BX = Pointer to EFI_TO_COMPATIBILITY16_BOOT_TABLE structure
   /// Return:
   ///   AX = Returned status codes
   ///
@@ -982,4 +982,6 @@ typedef struct {
   UINT16                            SecondaryBusMaster; ///< The secondary 
device bus master I/O base.
 } EFI_LEGACY_INSTALL_PCI_HANDLER;
 
+#pragma pack()
+
 #endif

-- 
Git-154)

_______________________________________________
SeaBIOS mailing list -- seabios@seabios.org
To unsubscribe send an email to seabios-le...@seabios.org

Reply via email to