Merge pull request #86 from realestate-com-au/master
Minor fixes for stricter compiler warnings
Showing
2 changed files
with
3 additions
and
2 deletions
@@ -39,7 +39,8 @@ | @@ -39,7 +39,8 @@ | ||
39 | } | 39 | } |
40 | 40 | ||
41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { | 41 | - (MASConstraint *)constraint:(MASConstraint __unused *)constraint addConstraintWithLayoutAttribute:(NSLayoutAttribute)layoutAttribute { |
42 | - MASConstraint *newConstraint = [self.delegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; | 42 | + id<MASConstraintDelegate> strongDelegate = self.delegate; |
43 | + MASConstraint *newConstraint = [strongDelegate constraint:self addConstraintWithLayoutAttribute:layoutAttribute]; | ||
43 | newConstraint.delegate = self; | 44 | newConstraint.delegate = self; |
44 | [self.childConstraints addObject:newConstraint]; | 45 | [self.childConstraints addObject:newConstraint]; |
45 | return newConstraint; | 46 | return newConstraint; |
@@ -112,7 +112,7 @@ static inline id _MASBoxValue(const char *type, ...) { | @@ -112,7 +112,7 @@ static inline id _MASBoxValue(const char *type, ...) { | ||
112 | unsigned char actual = (unsigned char)va_arg(v, unsigned int); | 112 | unsigned char actual = (unsigned char)va_arg(v, unsigned int); |
113 | obj = [NSNumber numberWithUnsignedChar:actual]; | 113 | obj = [NSNumber numberWithUnsignedChar:actual]; |
114 | } else if (strcmp(type, @encode(unsigned int)) == 0) { | 114 | } else if (strcmp(type, @encode(unsigned int)) == 0) { |
115 | - unsigned int actual = (int)va_arg(v, unsigned int); | 115 | + unsigned int actual = (unsigned int)va_arg(v, unsigned int); |
116 | obj = [NSNumber numberWithUnsignedInt:actual]; | 116 | obj = [NSNumber numberWithUnsignedInt:actual]; |
117 | } else if (strcmp(type, @encode(unsigned long)) == 0) { | 117 | } else if (strcmp(type, @encode(unsigned long)) == 0) { |
118 | unsigned long actual = (unsigned long)va_arg(v, unsigned long); | 118 | unsigned long actual = (unsigned long)va_arg(v, unsigned long); |
-
Please register or login to post a comment