From 184c93b1d004b2dea3722a69ddf3396e1f0a6e58 Mon Sep 17 00:00:00 2001 From: Olivier Crete Date: Mon, 24 Oct 2016 18:54:51 -0400 Subject: [PATCH] iOS Tutorials: Fix compile warnings --- tutorials/xcode iOS/Tutorial 4/VideoViewController.m | 8 ++++---- tutorials/xcode iOS/Tutorial 5/VideoViewController.m | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tutorials/xcode iOS/Tutorial 4/VideoViewController.m b/tutorials/xcode iOS/Tutorial 4/VideoViewController.m index b213a00c25..8d01771258 100644 --- a/tutorials/xcode iOS/Tutorial 4/VideoViewController.m +++ b/tutorials/xcode iOS/Tutorial 4/VideoViewController.m @@ -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 */ @@ -35,14 +35,14 @@ 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:@"%@ / %@", diff --git a/tutorials/xcode iOS/Tutorial 5/VideoViewController.m b/tutorials/xcode iOS/Tutorial 5/VideoViewController.m index 19f6f0eb74..65d96425b4 100644 --- a/tutorials/xcode iOS/Tutorial 5/VideoViewController.m +++ b/tutorials/xcode iOS/Tutorial 5/VideoViewController.m @@ -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 */ @@ -35,14 +35,14 @@ 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:@"%@ / %@",