smpeg2: fix gcc6 build

This commit is contained in:
Juergen Buchmueller 2016-09-22 12:07:15 +02:00
parent b5819318f0
commit be56bba4a8
2 changed files with 82 additions and 1 deletions

View file

@ -0,0 +1,81 @@
Here gcc6 complains about narrowing int -1 to unsigned int,
thus apply static_cast<unsigned int> to all unsigned int constants.
--- audio/hufftable.cpp 2013-06-01 17:19:04.000000000 +0200
+++ audio/hufftable.cpp 2016-09-22 12:03:44.562916914 +0200
@@ -548,40 +548,41 @@
{ 4, 1},{ 2, 1},{ 0, 12},{ 0, 13},{ 2, 1},{ 0, 14},
{ 0, 15}};
+#define ui static_cast<unsigned int>
const HUFFMANCODETABLE MPEGaudio::ht[HTN]=
{
- { 0, 0-1, 0-1, 0, 0, htd33},
- { 1, 2-1, 2-1, 0, 7,htd01},
- { 2, 3-1, 3-1, 0, 17,htd02},
- { 3, 3-1, 3-1, 0, 17,htd03},
- { 4, 0-1, 0-1, 0, 0, htd33},
- { 5, 4-1, 4-1, 0, 31,htd05},
- { 6, 4-1, 4-1, 0, 31,htd06},
- { 7, 6-1, 6-1, 0, 71,htd07},
- { 8, 6-1, 6-1, 0, 71,htd08},
- { 9, 6-1, 6-1, 0, 71,htd09},
- {10, 8-1, 8-1, 0,127,htd10},
- {11, 8-1, 8-1, 0,127,htd11},
- {12, 8-1, 8-1, 0,127,htd12},
- {13,16-1,16-1, 0,511,htd13},
- {14, 0-1, 0-1, 0, 0, htd33},
- {15,16-1,16-1, 0,511,htd15},
- {16,16-1,16-1, 1,511,htd16},
- {17,16-1,16-1, 2,511,htd16},
- {18,16-1,16-1, 3,511,htd16},
- {19,16-1,16-1, 4,511,htd16},
- {20,16-1,16-1, 6,511,htd16},
- {21,16-1,16-1, 8,511,htd16},
- {22,16-1,16-1,10,511,htd16},
- {23,16-1,16-1,13,511,htd16},
- {24,16-1,16-1, 4,512,htd24},
- {25,16-1,16-1, 5,512,htd24},
- {26,16-1,16-1, 6,512,htd24},
- {27,16-1,16-1, 7,512,htd24},
- {28,16-1,16-1, 8,512,htd24},
- {29,16-1,16-1, 9,512,htd24},
- {30,16-1,16-1,11,512,htd24},
- {31,16-1,16-1,13,512,htd24},
- {32, 1-1,16-1, 0, 31,htd32},
- {33, 1-1,16-1, 0, 31,htd33}
+ { 0,ui( 0-1),ui( 0-1), 0, 0, htd33},
+ { 1,ui( 2-1),ui( 2-1), 0, 7,htd01},
+ { 2,ui( 3-1),ui( 3-1), 0, 17,htd02},
+ { 3,ui( 3-1),ui( 3-1), 0, 17,htd03},
+ { 4,ui( 0-1),ui( 0-1), 0, 0, htd33},
+ { 5,ui( 4-1),ui( 4-1), 0, 31,htd05},
+ { 6,ui( 4-1),ui( 4-1), 0, 31,htd06},
+ { 7,ui( 6-1),ui( 6-1), 0, 71,htd07},
+ { 8,ui( 6-1),ui( 6-1), 0, 71,htd08},
+ { 9,ui( 6-1),ui( 6-1), 0, 71,htd09},
+ {10,ui( 8-1),ui( 8-1), 0,127,htd10},
+ {11,ui( 8-1),ui( 8-1), 0,127,htd11},
+ {12,ui( 8-1),ui( 8-1), 0,127,htd12},
+ {13,ui(16-1),ui(16-1), 0,511,htd13},
+ {14,ui( 0-1),ui( 0-1), 0, 0, htd33},
+ {15,ui(16-1),ui(16-1), 0,511,htd15},
+ {16,ui(16-1),ui(16-1), 1,511,htd16},
+ {17,ui(16-1),ui(16-1), 2,511,htd16},
+ {18,ui(16-1),ui(16-1), 3,511,htd16},
+ {19,ui(16-1),ui(16-1), 4,511,htd16},
+ {20,ui(16-1),ui(16-1), 6,511,htd16},
+ {21,ui(16-1),ui(16-1), 8,511,htd16},
+ {22,ui(16-1),ui(16-1),10,511,htd16},
+ {23,ui(16-1),ui(16-1),13,511,htd16},
+ {24,ui(16-1),ui(16-1), 4,512,htd24},
+ {25,ui(16-1),ui(16-1), 5,512,htd24},
+ {26,ui(16-1),ui(16-1), 6,512,htd24},
+ {27,ui(16-1),ui(16-1), 7,512,htd24},
+ {28,ui(16-1),ui(16-1), 8,512,htd24},
+ {29,ui(16-1),ui(16-1), 9,512,htd24},
+ {30,ui(16-1),ui(16-1),11,512,htd24},
+ {31,ui(16-1),ui(16-1),13,512,htd24},
+ {32,ui( 1-1),ui(16-1), 0, 31,htd32},
+ {33,ui( 1-1),ui(16-1), 0, 31,htd33}
};

View file

@ -1,7 +1,7 @@
# Template file for 'smpeg2'
pkgname=smpeg2
version=2.0.0
revision=1
revision=2
build_style=gnu-configure
makedepends="SDL2-devel"
short_desc="SDL2 MPEG Player Library"