From 3320071d3db1e96f50c5f8d4ae92e288e1f48764 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Tue, 15 Jan 2013 22:33:35 +0200 Subject: [PATCH] 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... --- modules/access/rtp/session.c | 2 +- modules/access/sdp.c | 2 +- modules/demux/smf.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/access/rtp/session.c b/modules/access/rtp/session.c index 5af1199229..a2699df941 100644 --- a/modules/access/rtp/session.c +++ b/modules/access/rtp/session.c @@ -149,7 +149,7 @@ struct rtp_source_t uint16_t last_seq; /* sequence of the next dequeued packet */ block_t *blocks; /* re-ordered blocks queue */ - void *opaque[0]; /* Per-source private payload data */ + void *opaque[1]; /* Per-source private payload data */ }; /** diff --git a/modules/access/sdp.c b/modules/access/sdp.c index 4c22a70bd8..05be729374 100644 --- a/modules/access/sdp.c +++ b/modules/access/sdp.c @@ -47,7 +47,7 @@ static int Control (access_t *, int, va_list); struct access_sys_t { size_t length; - char data[0]; + char data[1]; }; static int Open (vlc_object_t *obj) diff --git a/modules/demux/smf.c b/modules/demux/smf.c index bc75fa28f4..e98dcf5a86 100644 --- a/modules/demux/smf.c +++ b/modules/demux/smf.c @@ -68,7 +68,7 @@ struct demux_sys_t /* by the way, "quarter note" is "noire" in French */ unsigned trackc; /* Number of tracks */ - mtrk_t trackv[0]; /* Track states */ + mtrk_t trackv[1]; /* Track states */ }; /***************************************************************************** -- 2.39.2