[Mesa-dev] [PATCH mesa] move variable-sized struct at the end of parent struct

Eric Engestrom eric.engestrom at intel.com
Thu Nov 1 10:24:12 UTC 2018


  warning: field 'base' with variable sized type 'struct drm_i915_query_topology_info'
  not at the end of a struct or class is a GNU extension [-Wgnu-variable-sized-type-not-at-end]

Signed-off-by: Eric Engestrom <eric.engestrom at intel.com>
---
 src/intel/dev/gen_device_info.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index 5dbd06075722f8cc644e..242fe163447a4265acfb 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -991,8 +991,8 @@ gen_device_info_update_from_masks(struct gen_device_info *devinfo,
                                   uint32_t n_eus)
 {
    struct {
-      struct drm_i915_query_topology_info base;
       uint8_t data[100];
+      struct drm_i915_query_topology_info base;
    } topology;
 
    assert((slice_mask & 0xff) == slice_mask);
-- 
Cheers,
  Eric



More information about the mesa-dev mailing list