r600/radeonsi: silence zero-length-bounds gcc warnings
[mesa.git] / src / gallium / drivers / r600 / r600_pipe_common.h
index 2ecd03845e6afad5edd00505c945091cfa442f50..8accf7eae983870bfb27484bd54ddac1372a90c0 100644 (file)
@@ -289,7 +289,7 @@ struct r600_mmio_counter {
 };
 
 union r600_mmio_counters {
-       struct {
+       struct r600_mmio_counters_named {
                /* For global GPU load including SDMA. */
                struct r600_mmio_counter gpu;
 
@@ -320,7 +320,7 @@ union r600_mmio_counters {
                struct r600_mmio_counter cp_dma;
                struct r600_mmio_counter scratch_ram;
        } named;
-       unsigned array[0];
+       unsigned array[sizeof(struct r600_mmio_counters_named) / sizeof(unsigned)];
 };
 
 struct r600_memory_object {