From 072130be6a6d6a5c2ac4b8dc67edb1c3099a4826 Mon Sep 17 00:00:00 2001 From: Robert McGovern Date: Mon, 18 Apr 2022 11:51:39 +0100 Subject: [PATCH] Prevent Xcode compiler warning that methodImpl was not initialised when taking the default path. It should never go there, and will raise an NSAssert if it does, so this is just shutting the compiler up :) --- FSUserDefaults/FSUserDefaults.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FSUserDefaults/FSUserDefaults.m b/FSUserDefaults/FSUserDefaults.m index 8a8e0a2..03e03a4 100644 --- a/FSUserDefaults/FSUserDefaults.m +++ b/FSUserDefaults/FSUserDefaults.m @@ -142,7 +142,7 @@ GENERATE_SETTER_GETTER_METHOD_PAIR(NSURL, NSURL*) #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wpointer-type-mismatch" - IMP methodImpl; + IMP methodImpl = NULL; // added null to shut compiler warning up if default path taken, which it shouldnt. switch (propertyType) { case 'c': case 'B':