From b74edd406989cbb7a74b8462cb608b560918aa7b Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 4 Nov 2013 23:49:22 +0100 Subject: demux_mkv: fix compiler warnings Make TOOLS/matroska.pl output structs with fields sorted by name in ebml_types.h to make the order of fields deterministic. Fix warnings in demux_mkv.c caused by the first struct fields switching between scalar and struct types due to non-deterministic ebml_types.h field order. Since it's deterministic now, this shouldn't change anymore. The warnings produced by the compilers are bogus, but we want to silence them anyway, since this could make developers overlook legitimate warnings. What commits 7b52ba8, 6dd97cc, 4aae1ff were supposed to fix. An earlier attempt sorted fields in the generated C source file, not the header file. Hopefully this is the last commit concerning this issue... --- demux/demux_mkv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'demux/demux_mkv.c') diff --git a/demux/demux_mkv.c b/demux/demux_mkv.c index 6110d25930..7a9aaa0f87 100644 --- a/demux/demux_mkv.c +++ b/demux/demux_mkv.c @@ -359,7 +359,7 @@ static int demux_mkv_read_info(demuxer_t *demuxer) mkv_d->tc_scale = 1000000; mkv_d->duration = 0; - struct ebml_info info = {{0}}; + struct ebml_info info = {0}; struct ebml_parse_ctx parse_ctx = {0}; if (ebml_read_element(s, &parse_ctx, &info, &ebml_info_desc) < 0) return -1; @@ -1730,7 +1730,7 @@ static int read_ebml_header(demuxer_t *demuxer) if (ebml_read_id(s, NULL) != EBML_ID_EBML) return 0; - struct ebml_ebml ebml_master = {0}; + struct ebml_ebml ebml_master = {{0}}; struct ebml_parse_ctx parse_ctx = { .no_error_messages = true }; if (ebml_read_element(s, &parse_ctx, &ebml_master, &ebml_ebml_desc) < 0) return 0; -- cgit v1.2.3