smpeg: fix gcc6 build

This commit is contained in:
Juergen Buchmueller 2016-09-15 14:40:20 +02:00
parent c741ae1b46
commit 8c69c7cd1b
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 2010-12-25 07:37:52.000000000 +0100
+++ audio/hufftable.cpp 2016-09-15 14:26:04.931857000 +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),ui( 0),ui( 0), htd33},
+ { 1,ui( 2-1),ui( 2-1),ui( 0),ui( 7),htd01},
+ { 2,ui( 3-1),ui( 3-1),ui( 0),ui( 17),htd02},
+ { 3,ui( 3-1),ui( 3-1),ui( 0),ui( 17),htd03},
+ { 4,ui( 0-1),ui( 0-1),ui( 0),ui( 0), htd33},
+ { 5,ui( 4-1),ui( 4-1),ui( 0),ui( 31),htd05},
+ { 6,ui( 4-1),ui( 4-1),ui( 0),ui( 31),htd06},
+ { 7,ui( 6-1),ui( 6-1),ui( 0),ui( 71),htd07},
+ { 8,ui( 6-1),ui( 6-1),ui( 0),ui( 71),htd08},
+ { 9,ui( 6-1),ui( 6-1),ui( 0),ui( 71),htd09},
+ {10,ui( 8-1),ui( 8-1),ui( 0),ui(127),htd10},
+ {11,ui( 8-1),ui( 8-1),ui( 0),ui(127),htd11},
+ {12,ui( 8-1),ui( 8-1),ui( 0),ui(127),htd12},
+ {13,ui(16-1),ui(16-1),ui( 0),ui(511),htd13},
+ {14,ui( 0-1),ui( 0-1),ui( 0),ui( 0), htd33},
+ {15,ui(16-1),ui(16-1),ui( 0),ui(511),htd15},
+ {16,ui(16-1),ui(16-1),ui( 1),ui(511),htd16},
+ {17,ui(16-1),ui(16-1),ui( 2),ui(511),htd16},
+ {18,ui(16-1),ui(16-1),ui( 3),ui(511),htd16},
+ {19,ui(16-1),ui(16-1),ui( 4),ui(511),htd16},
+ {20,ui(16-1),ui(16-1),ui( 6),ui(511),htd16},
+ {21,ui(16-1),ui(16-1),ui( 8),ui(511),htd16},
+ {22,ui(16-1),ui(16-1),ui(10),ui(511),htd16},
+ {23,ui(16-1),ui(16-1),ui(13),ui(511),htd16},
+ {24,ui(16-1),ui(16-1),ui( 4),ui(512),htd24},
+ {25,ui(16-1),ui(16-1),ui( 5),ui(512),htd24},
+ {26,ui(16-1),ui(16-1),ui( 6),ui(512),htd24},
+ {27,ui(16-1),ui(16-1),ui( 7),ui(512),htd24},
+ {28,ui(16-1),ui(16-1),ui( 8),ui(512),htd24},
+ {29,ui(16-1),ui(16-1),ui( 9),ui(512),htd24},
+ {30,ui(16-1),ui(16-1),ui(11),ui(512),htd24},
+ {31,ui(16-1),ui(16-1),ui(13),ui(512),htd24},
+ {32,ui( 1-1),ui(16-1),ui( 0),ui( 31),htd32},
+ {33,ui( 1-1),ui(16-1),ui( 0),ui( 31),htd33}
};

View File

@ -1,7 +1,7 @@
# Template file for 'smpeg'
pkgname=smpeg
version=0.4.5
revision=3
revision=4
build_style=gnu-configure
configure_args="--with-sdl-prefix=${XBPS_CROSS_BASE}/usr --disable-gtk-player --disable-opengl-player"
make_build_args="LDFLAGS+=-lstdc++"