From 50227a6238b7905b712f724b2deaaca6830f7415 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Giancarlo=20Dess=C3=AC?= Date: Wed, 16 Dec 2020 18:36:31 +0100 Subject: libraries/libmp4v2: Patch for gcc >= 10.x. Signed-off-by: Matteo Bernardini --- .../libmp4v2-2.0.0-unsigned-int-cast.patch | 96 ++++++++++++++++++++++ libraries/libmp4v2/libmp4v2.SlackBuild | 3 + 2 files changed, 99 insertions(+) create mode 100644 libraries/libmp4v2/libmp4v2-2.0.0-unsigned-int-cast.patch (limited to 'libraries') diff --git a/libraries/libmp4v2/libmp4v2-2.0.0-unsigned-int-cast.patch b/libraries/libmp4v2/libmp4v2-2.0.0-unsigned-int-cast.patch new file mode 100644 index 0000000000..25830bc596 --- /dev/null +++ b/libraries/libmp4v2/libmp4v2-2.0.0-unsigned-int-cast.patch @@ -0,0 +1,96 @@ +From a5ca35b044bbf13c0b16f0066bf24646604bb218 Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" +Date: Thu, 6 Aug 2020 15:22:04 +0200 +Subject: [PATCH] Static cast to unsigned int for cases + +Signed-off-by: Jason A. Donenfeld +--- + libutil/Utility.cpp | 2 +- + util/mp4art.cpp | 2 +- + util/mp4chaps.cpp | 2 +- + util/mp4file.cpp | 2 +- + util/mp4subtitle.cpp | 2 +- + util/mp4track.cpp | 2 +- + 6 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/libutil/Utility.cpp b/libutil/Utility.cpp +index 76cdd12..d6739d4 100644 +--- a/libutil/Utility.cpp ++++ b/libutil/Utility.cpp +@@ -493,7 +493,7 @@ Utility::process_impl() + if( codes.find( code ) == codes.end() ) + continue; + +- switch( code ) { ++ switch( static_cast( code ) ) { + case 'z': + _optimize = true; + break; +diff --git a/util/mp4art.cpp b/util/mp4art.cpp +index add935e..6e7f531 100644 +--- a/util/mp4art.cpp ++++ b/util/mp4art.cpp +@@ -376,7 +376,7 @@ ArtUtility::utility_option( int code, bool& handled ) + { + handled = true; + +- switch( code ) { ++ switch( static_cast ( code ) ) { + case LC_ART_ANY: + _artFilter = numeric_limits::max(); + break; +diff --git a/util/mp4chaps.cpp b/util/mp4chaps.cpp +index 98400f8..ccc8b70 100644 +--- a/util/mp4chaps.cpp ++++ b/util/mp4chaps.cpp +@@ -632,7 +632,7 @@ ChapterUtility::utility_option( int code, bool& handled ) + { + handled = true; + +- switch( code ) { ++ switch( static_cast ( code ) ) { + case 'A': + case LC_CHPT_ANY: + _ChapterType = MP4ChapterTypeAny; +diff --git a/util/mp4file.cpp b/util/mp4file.cpp +index c27844b..b127cd1 100644 +--- a/util/mp4file.cpp ++++ b/util/mp4file.cpp +@@ -189,7 +189,7 @@ FileUtility::utility_option( int code, bool& handled ) + { + handled = true; + +- switch( code ) { ++ switch( static_cast( code ) ) { + case LC_LIST: + _action = &FileUtility::actionList; + break; +diff --git a/util/mp4subtitle.cpp b/util/mp4subtitle.cpp +index 7462153..19d977d 100644 +--- a/util/mp4subtitle.cpp ++++ b/util/mp4subtitle.cpp +@@ -164,7 +164,7 @@ SubtitleUtility::utility_option( int code, bool& handled ) + { + handled = true; + +- switch( code ) { ++ switch( static_cast( code ) ) { + case LC_LIST: + _action = &SubtitleUtility::actionList; + break; +diff --git a/util/mp4track.cpp b/util/mp4track.cpp +index d550506..cd63d7e 100644 +--- a/util/mp4track.cpp ++++ b/util/mp4track.cpp +@@ -788,7 +788,7 @@ TrackUtility::utility_option( int code, bool& handled ) + { + handled = true; + +- switch( code ) { ++ switch( static_cast( code ) ) { + case LC_TRACK_WILDCARD: + _trackMode = TM_WILDCARD; + break; +-- +2.28.0 + diff --git a/libraries/libmp4v2/libmp4v2.SlackBuild b/libraries/libmp4v2/libmp4v2.SlackBuild index a7e1eb8c40..28d9fe3a22 100644 --- a/libraries/libmp4v2/libmp4v2.SlackBuild +++ b/libraries/libmp4v2/libmp4v2.SlackBuild @@ -81,6 +81,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; +# thanks to Gentoo! +patch -p1 < $CWD/libmp4v2-2.0.0-unsigned-int-cast.patch + autoreconf -vif CFLAGS="$SLKCFLAGS" \ -- cgit v1.2.3