Commit 3320071d authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Avoid zero-length array

While useful, this is not permitted by the standard specification.
This patch will waste a little bit of memory in affected allocations...
parent 52d8d153
...@@ -149,7 +149,7 @@ struct rtp_source_t ...@@ -149,7 +149,7 @@ struct rtp_source_t
uint16_t last_seq; /* sequence of the next dequeued packet */ uint16_t last_seq; /* sequence of the next dequeued packet */
block_t *blocks; /* re-ordered blocks queue */ block_t *blocks; /* re-ordered blocks queue */
void *opaque[0]; /* Per-source private payload data */ void *opaque[1]; /* Per-source private payload data */
}; };
/** /**
......
...@@ -47,7 +47,7 @@ static int Control (access_t *, int, va_list); ...@@ -47,7 +47,7 @@ static int Control (access_t *, int, va_list);
struct access_sys_t struct access_sys_t
{ {
size_t length; size_t length;
char data[0]; char data[1];
}; };
static int Open (vlc_object_t *obj) static int Open (vlc_object_t *obj)
......
...@@ -68,7 +68,7 @@ struct demux_sys_t ...@@ -68,7 +68,7 @@ struct demux_sys_t
/* by the way, "quarter note" is "noire" in French */ /* by the way, "quarter note" is "noire" in French */
unsigned trackc; /* Number of tracks */ unsigned trackc; /* Number of tracks */
mtrk_t trackv[0]; /* Track states */ mtrk_t trackv[1]; /* Track states */
}; };
/***************************************************************************** /*****************************************************************************
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment