Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace zero-length arrays with flexible arrays #68

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libs/exanic/fifo_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ struct tx_chunk
* \note The actual data to transmit may not begin at the beginning of the
* payload due to padding. See \ref exanic_payload_padding_bytes.
*/
char payload[0];
char payload[];
};

/**
Expand Down Expand Up @@ -172,7 +172,7 @@ struct tx_payload_metadata
/**
* TCP payload starts here
*/
char payload[0];
char payload[];
};

/**
Expand Down
2 changes: 1 addition & 1 deletion libs/exanic/transceiver.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ typedef struct
{
double temp; /* degrees C */
unsigned num_lanes;
struct exanic_port_xcvr_diag lanes[0]; /* per lane diagnostics */
struct exanic_port_xcvr_diag lanes[]; /* per lane diagnostics */
} exanic_xcvr_diag_info_t;

/* port_number: ethernet interface number */
Expand Down