xref: /OK3568_Linux_fs/buildroot/package/mp4v2/0003-Static-cast-to-unsigned-int-for-cases.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1From a5ca35b044bbf13c0b16f0066bf24646604bb218 Mon Sep 17 00:00:00 2001
2From: "Jason A. Donenfeld" <Jason@zx2c4.com>
3Date: Thu, 6 Aug 2020 15:22:04 +0200
4Subject: [PATCH] Static cast to unsigned int for cases
5
6Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
7[Retrieved from:
8https://gitweb.gentoo.org/repo/gentoo.git/tree/media-libs/libmp4v2/files/libmp4v2-2.0.0-unsigned-int-cast.patch]
9Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
10---
11 libutil/Utility.cpp  | 2 +-
12 util/mp4art.cpp      | 2 +-
13 util/mp4chaps.cpp    | 2 +-
14 util/mp4file.cpp     | 2 +-
15 util/mp4subtitle.cpp | 2 +-
16 util/mp4track.cpp    | 2 +-
17 6 files changed, 6 insertions(+), 6 deletions(-)
18
19diff --git a/libutil/Utility.cpp b/libutil/Utility.cpp
20index 76cdd12..d6739d4 100644
21--- a/libutil/Utility.cpp
22+++ b/libutil/Utility.cpp
23@@ -493,7 +493,7 @@ Utility::process_impl()
24         if( codes.find( code ) == codes.end() )
25             continue;
26
27-        switch( code ) {
28+        switch( static_cast<unsigned int>( code ) ) {
29             case 'z':
30                 _optimize = true;
31                 break;
32diff --git a/util/mp4art.cpp b/util/mp4art.cpp
33index add935e..6e7f531 100644
34--- a/util/mp4art.cpp
35+++ b/util/mp4art.cpp
36@@ -376,7 +376,7 @@ ArtUtility::utility_option( int code, bool& handled )
37 {
38     handled = true;
39
40-    switch( code ) {
41+    switch( static_cast<unsigned int> ( code ) ) {
42         case LC_ART_ANY:
43             _artFilter = numeric_limits<uint32_t>::max();
44             break;
45diff --git a/util/mp4chaps.cpp b/util/mp4chaps.cpp
46index 98400f8..ccc8b70 100644
47--- a/util/mp4chaps.cpp
48+++ b/util/mp4chaps.cpp
49@@ -632,7 +632,7 @@ ChapterUtility::utility_option( int code, bool& handled )
50 {
51     handled = true;
52
53-    switch( code ) {
54+    switch( static_cast<unsigned int> ( code ) ) {
55         case 'A':
56         case LC_CHPT_ANY:
57             _ChapterType = MP4ChapterTypeAny;
58diff --git a/util/mp4file.cpp b/util/mp4file.cpp
59index c27844b..b127cd1 100644
60--- a/util/mp4file.cpp
61+++ b/util/mp4file.cpp
62@@ -189,7 +189,7 @@ FileUtility::utility_option( int code, bool& handled )
63 {
64     handled = true;
65
66-    switch( code ) {
67+    switch( static_cast<unsigned int>( code ) ) {
68         case LC_LIST:
69             _action = &FileUtility::actionList;
70             break;
71diff --git a/util/mp4subtitle.cpp b/util/mp4subtitle.cpp
72index 7462153..19d977d 100644
73--- a/util/mp4subtitle.cpp
74+++ b/util/mp4subtitle.cpp
75@@ -164,7 +164,7 @@ SubtitleUtility::utility_option( int code, bool& handled )
76 {
77     handled = true;
78
79-    switch( code ) {
80+    switch( static_cast<unsigned int>( code ) ) {
81         case LC_LIST:
82             _action = &SubtitleUtility::actionList;
83             break;
84diff --git a/util/mp4track.cpp b/util/mp4track.cpp
85index d550506..cd63d7e 100644
86--- a/util/mp4track.cpp
87+++ b/util/mp4track.cpp
88@@ -788,7 +788,7 @@ TrackUtility::utility_option( int code, bool& handled )
89 {
90     handled = true;
91
92-    switch( code ) {
93+    switch( static_cast<unsigned int>( code ) ) {
94         case LC_TRACK_WILDCARD:
95             _trackMode = TM_WILDCARD;
96             break;
97--
982.28.0
99
100