summaryrefslogtreecommitdiff
blob: a5b28c32022f18b72b4332d81113e451dd50f6c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
From a5ca35b044bbf13c0b16f0066bf24646604bb218 Mon Sep 17 00:00:00 2001
From: "Jason A. Donenfeld" <Jason@zx2c4.com>
Date: Thu, 6 Aug 2020 15:22:04 +0200
Subject: [PATCH] Static cast to unsigned int for cases

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
--- 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<unsigned int>( code ) ) {
             case 'z':
                 _optimize = true;
                 break;
--- 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<unsigned int> ( code ) ) {
         case LC_ART_ANY:
             _artFilter = numeric_limits<uint32_t>::max();
             break;
--- 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<unsigned int> ( code ) ) {
         case 'A':
         case LC_CHPT_ANY:
             _ChapterType = MP4ChapterTypeAny;
--- 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<unsigned int>( code ) ) {
         case LC_LIST:
             _action = &FileUtility::actionList;
             break;
--- 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<unsigned int>( code ) ) {
         case LC_LIST:
             _action = &SubtitleUtility::actionList;
             break;
--- 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<unsigned int>( code ) ) {
         case LC_TRACK_WILDCARD:
             _trackMode = TM_WILDCARD;
             break;
-- 
2.28.0