From 941380e219ca4921ecef955eb3bd98b817cbf1da Mon Sep 17 00:00:00 2001 From: Nick Banks Date: Mon, 27 Jan 2014 13:10:43 +0000 Subject: [PATCH] Fixed warnings when compiling in upcoming version of Xcode --- Categories/UIImage+Blurring.m | 2 +- Categories/UIImage+Filtering.m | 6 +++--- Classes/NYXProgressiveImageView.m | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Categories/UIImage+Blurring.m b/Categories/UIImage+Blurring.m index d5d7c9b..a4b572d 100644 --- a/Categories/UIImage+Blurring.m +++ b/Categories/UIImage+Blurring.m @@ -48,7 +48,7 @@ -(UIImage*)gaussianBlurWithBias:(NSInteger)bias void* outt = malloc(n); vImage_Buffer src = {data, height, width, bytesPerRow}; vImage_Buffer dest = {outt, height, width, bytesPerRow}; - vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_gaussianblur_kernel_5x5, 5, 5, 256/*divisor*/, bias, NULL, kvImageCopyInPlace); + vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_gaussianblur_kernel_5x5, 5, 5, 256/*divisor*/, (int32_t)bias, NULL, kvImageCopyInPlace); memcpy(data, outt, n); free(outt); diff --git a/Categories/UIImage+Filtering.m b/Categories/UIImage+Filtering.m index 2446309..eba3e04 100755 --- a/Categories/UIImage+Filtering.m +++ b/Categories/UIImage+Filtering.m @@ -302,7 +302,7 @@ -(UIImage*)embossWithBias:(NSInteger)bias void* outt = malloc(n); vImage_Buffer src = {data, height, width, bytesPerRow}; vImage_Buffer dest = {outt, height, width, bytesPerRow}; - vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_emboss_kernel_3x3, 3, 3, 1/*divisor*/, bias, NULL, kvImageCopyInPlace); + vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_emboss_kernel_3x3, 3, 3, 1/*divisor*/, (int32_t)bias, NULL, kvImageCopyInPlace); memcpy(data, outt, n); @@ -624,7 +624,7 @@ -(UIImage*)sharpenWithBias:(NSInteger)bias void* outt = malloc(n); vImage_Buffer src = {data, height, width, bytesPerRow}; vImage_Buffer dest = {outt, height, width, bytesPerRow}; - vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_sharpen_kernel_3x3, 3, 3, 1/*divisor*/, bias, NULL, kvImageCopyInPlace); + vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_sharpen_kernel_3x3, 3, 3, 1/*divisor*/, (int32_t)bias, NULL, kvImageCopyInPlace); memcpy(data, outt, n); @@ -665,7 +665,7 @@ -(UIImage*)unsharpenWithBias:(NSInteger)bias void* outt = malloc(n); vImage_Buffer src = {data, height, width, bytesPerRow}; vImage_Buffer dest = {outt, height, width, bytesPerRow}; - vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_unsharpen_kernel_3x3, 3, 3, 9/*divisor*/, bias, NULL, kvImageCopyInPlace); + vImageConvolveWithBias_ARGB8888(&src, &dest, NULL, 0, 0, __s_unsharpen_kernel_3x3, 3, 3, 9/*divisor*/, (int32_t)bias, NULL, kvImageCopyInPlace); memcpy(data, outt, n); diff --git a/Classes/NYXProgressiveImageView.m b/Classes/NYXProgressiveImageView.m index e3931f6..77167cf 100644 --- a/Classes/NYXProgressiveImageView.m +++ b/Classes/NYXProgressiveImageView.m @@ -199,7 +199,7 @@ -(void)connection:(__unused NSURLConnection*)connection didReceiveData:(NSData*) { [_dataTemp appendData:data]; - const NSUInteger len = [_dataTemp length]; + const long long len = (long long)[_dataTemp length]; CGImageSourceUpdateData(_imageSource, (__bridge CFDataRef)_dataTemp, (len == _expectedSize) ? true : false); if (_imageHeight > 0 && _imageWidth > 0) @@ -356,7 +356,7 @@ -(NSString*)cachedImageSystemName return @""; unsigned char result[CC_MD5_DIGEST_LENGTH]; - CC_MD5(concat_str, strlen(concat_str), result); + CC_MD5(concat_str, (CC_LONG)strlen(concat_str), result); NSMutableString* hash = [[NSMutableString alloc] init]; for (unsigned int i = 0; i < CC_MD5_DIGEST_LENGTH; i++)