Use gcc warning flag -Wempty-body
If the compiler supports the warning flag -Wempty-body, use it. Adjust the code to avoid the warnings. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
		
							parent
							
								
									a21493e009
								
							
						
					
					
						commit
						3ffd710e12
					
				
							
								
								
									
										2
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								configure
									
									
									
									
										vendored
									
									
								
							@ -140,7 +140,7 @@ LDFLAGS="-g $LDFLAGS"
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
 | 
					gcc_flags="-Wold-style-declaration -Wold-style-definition -Wtype-limits"
 | 
				
			||||||
gcc_flags="-Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers $gcc_flags"
 | 
					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"
 | 
					gcc_flags="-fstack-protector-all $gcc_flags"
 | 
				
			||||||
cat > $TMPC << EOF
 | 
					cat > $TMPC << EOF
 | 
				
			||||||
int main(void) { return 0; }
 | 
					int main(void) { return 0; }
 | 
				
			||||||
 | 
				
			|||||||
@ -190,8 +190,9 @@ static uint32_t omap_i2c_read(void *opaque, target_phys_addr_t addr)
 | 
				
			|||||||
            if (s->rxlen > 2)
 | 
					            if (s->rxlen > 2)
 | 
				
			||||||
                s->fifo >>= 16;
 | 
					                s->fifo >>= 16;
 | 
				
			||||||
            s->rxlen -= 2;
 | 
					            s->rxlen -= 2;
 | 
				
			||||||
        } else
 | 
					        } else {
 | 
				
			||||||
            /* XXX: remote access (qualifier) error - what's that?  */;
 | 
					            /* XXX: remote access (qualifier) error - what's that?  */
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        if (!s->rxlen) {
 | 
					        if (!s->rxlen) {
 | 
				
			||||||
            s->stat &= ~(1 << 3);				/* RRDY */
 | 
					            s->stat &= ~(1 << 3);				/* RRDY */
 | 
				
			||||||
            if (((s->control >> 10) & 1) &&			/* MST */
 | 
					            if (((s->control >> 10) & 1) &&			/* MST */
 | 
				
			||||||
 | 
				
			|||||||
@ -559,8 +559,9 @@ static void omap_mmc_cover_cb(void *opaque, int line, int level)
 | 
				
			|||||||
    if (!host->cdet_state && level) {
 | 
					    if (!host->cdet_state && level) {
 | 
				
			||||||
        host->status |= 0x0002;
 | 
					        host->status |= 0x0002;
 | 
				
			||||||
        omap_mmc_interrupts_update(host);
 | 
					        omap_mmc_interrupts_update(host);
 | 
				
			||||||
        if (host->cdet_wakeup)
 | 
					        if (host->cdet_wakeup) {
 | 
				
			||||||
            /* TODO: Assert wake-up */;
 | 
					            /* TODO: Assert wake-up */
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if (host->cdet_state != level) {
 | 
					    if (host->cdet_state != level) {
 | 
				
			||||||
 | 
				
			|||||||
@ -1877,8 +1877,9 @@ static void pxa2xx_fir_write(void *opaque, target_phys_addr_t addr,
 | 
				
			|||||||
        s->control[0] = value;
 | 
					        s->control[0] = value;
 | 
				
			||||||
        if (!(value & (1 << 4)))			/* RXE */
 | 
					        if (!(value & (1 << 4)))			/* RXE */
 | 
				
			||||||
            s->rx_len = s->rx_start = 0;
 | 
					            s->rx_len = s->rx_start = 0;
 | 
				
			||||||
        if (!(value & (1 << 3)))			/* TXE */
 | 
					        if (!(value & (1 << 3))) {                      /* TXE */
 | 
				
			||||||
            /* Nop */;
 | 
					            /* Nop */
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
        s->enable = value & 1;				/* ITR */
 | 
					        s->enable = value & 1;				/* ITR */
 | 
				
			||||||
        if (!s->enable)
 | 
					        if (!s->enable)
 | 
				
			||||||
            s->status[0] = 0;
 | 
					            s->status[0] = 0;
 | 
				
			||||||
 | 
				
			|||||||
@ -192,12 +192,13 @@ static void soc_dma_ch_freq_update(struct dma_s *s)
 | 
				
			|||||||
    if (s->enabled_count)
 | 
					    if (s->enabled_count)
 | 
				
			||||||
        /* We completely ignore channel priorities and stuff */
 | 
					        /* We completely ignore channel priorities and stuff */
 | 
				
			||||||
        s->channel_freq = s->soc.freq / s->enabled_count;
 | 
					        s->channel_freq = s->soc.freq / s->enabled_count;
 | 
				
			||||||
    else
 | 
					    else {
 | 
				
			||||||
        /* TODO: Signal that we want to disable the functional clock and let
 | 
					        /* 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
 | 
					         * 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
 | 
					         * 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
 | 
					         * 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)
 | 
					void soc_dma_set_request(struct soc_dma_ch_s *ch, int level)
 | 
				
			||||||
 | 
				
			|||||||
@ -33,7 +33,7 @@
 | 
				
			|||||||
#define D(x) x
 | 
					#define D(x) x
 | 
				
			||||||
#define D_LOG(...) qemu_log(__VA_ARGS__)
 | 
					#define D_LOG(...) qemu_log(__VA_ARGS__)
 | 
				
			||||||
#else
 | 
					#else
 | 
				
			||||||
#define D(x)
 | 
					#define D(x) do { } while (0)
 | 
				
			||||||
#define D_LOG(...) do { } while (0)
 | 
					#define D_LOG(...) do { } while (0)
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user