]> Git Repo - qemu.git/commitdiff
Use gcc warning flag -Wempty-body
authorBlue Swirl <[email protected]>
Sat, 18 Sep 2010 07:01:48 +0000 (07:01 +0000)
committerBlue Swirl <[email protected]>
Sat, 18 Sep 2010 07:01:48 +0000 (07:01 +0000)
If the compiler supports the warning flag -Wempty-body, use it.

Adjust the code to avoid the warnings.

Signed-off-by: Blue Swirl <[email protected]>
configure
hw/omap_i2c.c
hw/omap_mmc.c
hw/pxa2xx.c
hw/soc_dma.c
target-cris/mmu.c

index 506f29ceb2f12865c6232ef445a4bc3b61c0f8b1..80497aab75af287b25bc75694f0dc4355551a624 100755 (executable)
--- a/configure
+++ b/configure
@@ -140,7 +140,7 @@ LDFLAGS="-g $LDFLAGS"
 
 gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
 gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
-gcc_flags="-Wmissing-include-dirs $gcc_flags"
+gcc_flags="-Wmissing-include-dirs -Wempty-body $gcc_flags"
 gcc_flags="-fstack-protector-all $gcc_flags"
 cat > $TMPC << EOF
 int main(void) { return 0; }
index d7c18882dacdd407798cdfef345b1d6b7a5840a2..d133977e7fb99b61cb069e9b30615e9fe034dc81 100644 (file)
@@ -190,8 +190,9 @@ static uint32_t omap_i2c_read(void *opaque, target_phys_addr_t addr)
             if (s->rxlen > 2)
                 s->fifo >>= 16;
             s->rxlen -= 2;
-        } else
-            /* XXX: remote access (qualifier) error - what's that?  */;
+        } else {
+            /* XXX: remote access (qualifier) error - what's that?  */
+        }
         if (!s->rxlen) {
             s->stat &= ~(1 << 3);                              /* RRDY */
             if (((s->control >> 10) & 1) &&                    /* MST */
index 15cbf06c8792274aaf15dea81ce6fc978c79f24d..9d167ff53542adb4ab8de664e86952601b893b27 100644 (file)
@@ -559,8 +559,9 @@ static void omap_mmc_cover_cb(void *opaque, int line, int level)
     if (!host->cdet_state && level) {
         host->status |= 0x0002;
         omap_mmc_interrupts_update(host);
-        if (host->cdet_wakeup)
-            /* TODO: Assert wake-up */;
+        if (host->cdet_wakeup) {
+            /* TODO: Assert wake-up */
+        }
     }
 
     if (host->cdet_state != level) {
index 88f61c069e321879bf35d36e7a7074c692a9affa..6e046450dfd2794d474e10ae8fdcc944cd92dfa2 100644 (file)
@@ -1877,8 +1877,9 @@ static void pxa2xx_fir_write(void *opaque, target_phys_addr_t addr,
         s->control[0] = value;
         if (!(value & (1 << 4)))                       /* RXE */
             s->rx_len = s->rx_start = 0;
-        if (!(value & (1 << 3)))                       /* TXE */
-            /* Nop */;
+        if (!(value & (1 << 3))) {                      /* TXE */
+            /* Nop */
+        }
         s->enable = value & 1;                         /* ITR */
         if (!s->enable)
             s->status[0] = 0;
index e116e6373a599306ff43f840131eda39dd6840ed..23ec51695abdb0e9b323fc160cad6ce5e9a49bee 100644 (file)
@@ -192,12 +192,13 @@ static void soc_dma_ch_freq_update(struct dma_s *s)
     if (s->enabled_count)
         /* We completely ignore channel priorities and stuff */
         s->channel_freq = s->soc.freq / s->enabled_count;
-    else
+    else {
         /* TODO: Signal that we want to disable the functional clock and let
          * the platform code decide what to do with it, i.e. check that
          * auto-idle is enabled in the clock controller and if we are stopping
          * the clock, do the same with any parent clocks that had only one
-         * user keeping them on and auto-idle enabled.  */;
+         * user keeping them on and auto-idle enabled.  */
+    }
 }
 
 void soc_dma_set_request(struct soc_dma_ch_s *ch, int level)
index 773438e9f457a11a388710c128fc720d6e48249a..3f290ba9e0c1df17a71686a6930f6d2efe15ae03 100644 (file)
@@ -33,7 +33,7 @@
 #define D(x) x
 #define D_LOG(...) qemu_log(__VA_ARGS__)
 #else
-#define D(x)
+#define D(x) do { } while (0)
 #define D_LOG(...) do { } while (0)
 #endif
 
This page took 0.04192 seconds and 4 git commands to generate.