Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #593 from Mantle/initialize-variables
Initialize variables
  • Loading branch information
robb committed Aug 20, 2015
2 parents e5d59be + b83f2c6 commit b11cd11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Mantle/MTLJSONAdapter.m
Expand Up @@ -294,7 +294,7 @@ - (id)modelFromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)e
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];

for (NSString *keyPath in JSONKeyPaths) {
BOOL success;
BOOL success = NO;
id value = [JSONDictionary mtl_valueForJSONKeyPath:keyPath success:&success error:error];

if (!success) return nil;
Expand All @@ -304,7 +304,7 @@ - (id)modelFromJSONDictionary:(NSDictionary *)JSONDictionary error:(NSError **)e

value = dictionary;
} else {
BOOL success;
BOOL success = NO;
value = [JSONDictionary mtl_valueForJSONKeyPath:JSONKeyPaths success:&success error:error];

if (!success) return nil;
Expand Down
4 changes: 2 additions & 2 deletions MantleTests/MTLTransformerErrorExamples.m
Expand Up @@ -36,7 +36,7 @@ + (void)configure:(Configuration *)configuration {

it(@"should return errors occurring during transformation", ^{
__block NSError *error;
__block BOOL success;
__block BOOL success = NO;

expect([transformer transformedValue:invalidTransformationInput success:&success error:&error]).to(beNil());
expect(@(success)).to(beFalsy());
Expand All @@ -50,7 +50,7 @@ + (void)configure:(Configuration *)configuration {
if (![transformer.class allowsReverseTransformation]) return;

__block NSError *error;
__block BOOL success;
__block BOOL success = NO;

expect([transformer reverseTransformedValue:invalidReverseTransformationInput success:&success error:&error]).to(beNil());
expect(@(success)).to(beFalsy());
Expand Down

0 comments on commit b11cd11

Please sign in to comment.