From 6dd97ccf5c89db1be2312ffee3d81f74afb6d80a Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Sat, 2 Nov 2013 01:43:49 +0000 Subject: matroska.pl: Sort the generated struct field list Newer versions of perl randomize the hash used for hashes every time it's run; this makes the order of the fields be non-deterministic. Tack a sort there to make it deterministic. Needed to fix (or allow fixing) a buggy gcc warning. --- TOOLS/matroska.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'TOOLS') diff --git a/TOOLS/matroska.pl b/TOOLS/matroska.pl index 3ab06df6f9..4eda2de44f 100755 --- a/TOOLS/matroska.pl +++ b/TOOLS/matroska.pl @@ -101,7 +101,7 @@ sub generate_c_definitions { # define a field for each subelement # also does lots of macro magic, but doesn't open a scope - for my $subel (values %{$el->{subelements}}) { + for my $subel (sort { $a->{definename} cmp $b->{definename} } values %{$el->{subelements}}) { print "F($subel->{definename}, $subel->{fieldname}, ". ($subel->{multiple}?'1':'0').")\n"; } @@ -166,4 +166,4 @@ sub process_elem { } else { print "$elem->{type} ". $elem->get_value ."\n"; } -} \ No newline at end of file +} -- cgit v1.2.3