vendorcode/cavium: Use C99 flexible arrays
Use C99 flexible arrays instead of older style of one-element or zero-length arrays. It allows the compiler to generate errors when the flexible array does not occur at the end in the structure. Change-Id: I19c029968584fedbb6749e66c7ea2f74a7d580f4 Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/76811 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Martin L Roth <gaumless@gmail.com>
This commit is contained in:
		
				
					committed by
					
						
						Matt DeVillier
					
				
			
			
				
	
			
			
			
						parent
						
							dadb248333
						
					
				
				
					commit
					eb23fbeab0
				
			@@ -80,7 +80,7 @@ typedef struct
 | 
				
			|||||||
    int next_free_cpi;
 | 
					    int next_free_cpi;
 | 
				
			||||||
    int next_free_rssi;
 | 
					    int next_free_rssi;
 | 
				
			||||||
    int next_free_bpid;
 | 
					    int next_free_bpid;
 | 
				
			||||||
    nic_t *nic_map[0]; /* Indexed by handle->nic_id */
 | 
					    nic_t *nic_map[]; /* Indexed by handle->nic_id */
 | 
				
			||||||
} nic_node_state_t;
 | 
					} nic_node_state_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static nic_node_state_t *global_node_state[BDK_NUMA_MAX_NODES];
 | 
					static nic_node_state_t *global_node_state[BDK_NUMA_MAX_NODES];
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -153,7 +153,7 @@ typedef struct __bdk_if_port
 | 
				
			|||||||
    char        name[16];
 | 
					    char        name[16];
 | 
				
			||||||
    struct __bdk_if_port *next;
 | 
					    struct __bdk_if_port *next;
 | 
				
			||||||
    struct __bdk_if_port *poll_next;
 | 
					    struct __bdk_if_port *poll_next;
 | 
				
			||||||
    char        priv[0];
 | 
					    char        priv[];
 | 
				
			||||||
} __bdk_if_port_t;
 | 
					} __bdk_if_port_t;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
typedef __bdk_if_port_t *bdk_if_handle_t;
 | 
					typedef __bdk_if_port_t *bdk_if_handle_t;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user