iOS Tutorials: Fix compile warnings
authorOlivier Crete <olivier.crete@collabora.com>
Mon, 24 Oct 2016 22:54:51 +0000 (18:54 -0400)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 25 Oct 2016 00:12:25 +0000 (20:12 -0400)
tutorials/xcode iOS/Tutorial 4/VideoViewController.m
tutorials/xcode iOS/Tutorial 5/VideoViewController.m

index b213a00..8d01771 100644 (file)
@@ -4,8 +4,8 @@
 
 @interface VideoViewController () {
     GStreamerBackend *gst_backend;
-    int media_width;                /* Width of the clip */
-    int media_height;               /* height of the clip */
+    NSInteger media_width;                /* Width of the clip */
+    NSInteger media_height;               /* height of the clip */
     Boolean dragging_slider;        /* Whether the time slider is being dragged or not */
     Boolean is_local_media;         /* Whether this clip is stored locally or is being streamed */
     Boolean is_playing_desired;     /* Whether the user asked to go to PLAYING */
         NSUInteger minutes = (duration / 60) % 60;
         NSUInteger seconds = duration % 60;
 
-        duration_txt = [NSString stringWithFormat:@"%02u:%02u:%02u", hours, minutes, seconds];
+        duration_txt = [NSString stringWithFormat:@"%02lu:%02lu:%02lu", (unsigned long)hours, (unsigned long)minutes, (unsigned long)seconds];
     }
     if (position > 0) {
         NSUInteger hours = position / (60 * 60);
         NSUInteger minutes = (position / 60) % 60;
         NSUInteger seconds = position % 60;
 
-        position_txt = [NSString stringWithFormat:@"%02u:%02u:%02u", hours, minutes, seconds];
+        position_txt = [NSString stringWithFormat:@"%02lu:%02lu:%02lu", (unsigned long)hours, (unsigned long)minutes, (unsigned long)seconds];
     }
 
     NSString *text = [NSString stringWithFormat:@"%@ / %@",
index 19f6f0e..65d9642 100644 (file)
@@ -4,8 +4,8 @@
 
 @interface VideoViewController () {
     GStreamerBackend *gst_backend;
-    int media_width;                /* Width of the clip */
-    int media_height;               /* height ofthe clip */
+    NSInteger media_width;                /* Width of the clip */
+    NSInteger media_height;               /* height ofthe clip */
     Boolean dragging_slider;        /* Whether the time slider is being dragged or not */
     Boolean is_local_media;         /* Whether this clip is stored locally or is being streamed */
     Boolean is_playing_desired;     /* Whether the user asked to go to PLAYING */
         NSUInteger minutes = (duration / 60) % 60;
         NSUInteger seconds = duration % 60;
 
-        duration_txt = [NSString stringWithFormat:@"%02u:%02u:%02u", hours, minutes, seconds];
+        duration_txt = [NSString stringWithFormat:@"%02lu:%02lu:%02lu", (unsigned long)hours, (unsigned long)minutes, (unsigned long)seconds];
     }
     if (position > 0) {
         NSUInteger hours = position / (60 * 60);
         NSUInteger minutes = (position / 60) % 60;
         NSUInteger seconds = position % 60;
 
-        position_txt = [NSString stringWithFormat:@"%02u:%02u:%02u", hours, minutes, seconds];
+        position_txt = [NSString stringWithFormat:@"%02lu:%02lu:%02lu", (unsigned long)hours, (unsigned long)minutes, (unsigned long)seconds];
     }
 
     NSString *text = [NSString stringWithFormat:@"%@ / %@",