From 4d99ca6c86493003e44d4ecb5c69f31eb9303655 Mon Sep 17 00:00:00 2001 From: Dwayne Coussement Date: Mon, 14 Aug 2017 15:05:46 +0200 Subject: [PATCH] CLANG_WARN_STRICT_PROTOTYPES: Yes please! --- SDWebImage.xcodeproj/project.pbxproj | 2 ++ SDWebImage/SDWebImageCompat.h | 2 +- SDWebImage/SDWebImageDownloader.m | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/SDWebImage.xcodeproj/project.pbxproj b/SDWebImage.xcodeproj/project.pbxproj index 77e92845..98489884 100644 --- a/SDWebImage.xcodeproj/project.pbxproj +++ b/SDWebImage.xcodeproj/project.pbxproj @@ -3097,6 +3097,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = NO; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -3159,6 +3160,7 @@ CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = NO; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; diff --git a/SDWebImage/SDWebImageCompat.h b/SDWebImage/SDWebImageCompat.h index 39adeaca..e950a6ac 100644 --- a/SDWebImage/SDWebImageCompat.h +++ b/SDWebImage/SDWebImageCompat.h @@ -95,7 +95,7 @@ FOUNDATION_EXPORT UIImage *SDScaledImageForKey(NSString *key, UIImage *image); -typedef void(^SDWebImageNoParamsBlock)(); +typedef void(^SDWebImageNoParamsBlock)(void); FOUNDATION_EXPORT NSString *const SDWebImageErrorDomain; diff --git a/SDWebImage/SDWebImageDownloader.m b/SDWebImage/SDWebImageDownloader.m index 29e7d59d..203b64aa 100644 --- a/SDWebImage/SDWebImageDownloader.m +++ b/SDWebImage/SDWebImageDownloader.m @@ -224,7 +224,7 @@ - (nullable SDWebImageDownloadToken *)addProgressCallback:(SDWebImageDownloaderProgressBlock)progressBlock completedBlock:(SDWebImageDownloaderCompletedBlock)completedBlock forURL:(nullable NSURL *)url - createCallback:(SDWebImageDownloaderOperation *(^)())createCallback { + createCallback:(SDWebImageDownloaderOperation *(^)(void))createCallback { // The URL will be used as the key to the callbacks dictionary so it cannot be nil. If it is nil immediately call the completed block with no image or data. if (url == nil) { if (completedBlock != nil) {