ibireme / YYKit

A collection of iOS components.
MIT License
13.99k stars 3.69k forks source link

用facebook inter扫描发现的问题 #375

Open goodcyg opened 7 years ago

goodcyg commented 7 years ago

tq/YYKit/Image/YYAnimatedImageView.m:542: error: NULL_DEREFERENCE pointer self last assigned on line 541 could be null and is dereferenced at line 542, column 5

    • (instancetype)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super initWithCoder:aDecoder];
  2. _runloopMode = [aDecoder decodeObjectForKey:@"runloopMode"];
  3. if (_runloopMode.length == 0) _runloopMode = NSRunLoopCommonModes;
  4. if ([aDecoder containsValueForKey:@"autoPlayAnimatedImage"]) {

tq/YYKit/Image/YYAnimatedImageView.m:120: error: NULL_DEREFERENCE pointer self last assigned on line 119 could be null and is dereferenced at line 120, column 5

    • (instancetype)initWithFrame:(CGRect)frame {
  1. self = [super initWithFrame:frame];
  2. _runloopMode = NSRunLoopCommonModes;
  3. _autoPlayAnimatedImage = YES;
  4. return self;

tq/YYKit/Image/YYAnimatedImageView.m:136: error: NULL_DEREFERENCE pointer self last assigned on line 135 could be null and is dereferenced at line 136, column 5

    • (instancetype)initWithImage:(UIImage )image highlightedImage:(UIImage )highlightedImage {
  1. self = [super init];
  2. _runloopMode = NSRunLoopCommonModes;
  3. _autoPlayAnimatedImage = YES;
  4. CGSize size = image ? image.size : highlightedImage.size;

tq/YYKit/Image/YYAnimatedImageView.m:127: error: NULL_DEREFERENCE pointer self last assigned on line 126 could be null and is dereferenced at line 127, column 5

    • (instancetype)initWithImage:(UIImage *)image {
  1. self = [super init];
  2. _runloopMode = NSRunLoopCommonModes;
  3. _autoPlayAnimatedImage = YES;
  4. self.frame = (CGRect) {CGPointZero, image.size };

tq/YYKit/Image/YYAnimatedImageView.m:113: error: NULL_DEREFERENCE pointer self last assigned on line 112 could be null and is dereferenced at line 113, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _runloopMode = NSRunLoopCommonModes;
  3. _autoPlayAnimatedImage = YES;
  4. return self;

tq/YYKit/Utility/YYAsyncLayer.m:88: error: NULL_DEREFERENCE pointer self last assigned on line 81 could be null and is dereferenced at line 88, column 5

  1. });
  2. self.contentsScale = scale;
  3. _sentinel = [YYSentinel new];
  4. _displaysAsynchronously = YES;
  5. return self;

tq/YYKit/Image/YYImageCoder.m:692: error: MEMORY_LEAK memory dynamically allocated by call to YYCGColorSpaceGetDeviceGray() at line 692, column 36 is not reachable after line 692, column 21

  1. BOOL YYCGColorSpaceIsDeviceGray(CGColorSpaceRef space)
  2. {
  3. return space && CFEqual(space, YYCGColorSpaceGetDeviceGray());
  4. }

tq/YYKit/Image/YYImageCoder.m:687: error: MEMORY_LEAK memory dynamically allocated by call to YYCGColorSpaceGetDeviceRGB() at line 687, column 36 is not reachable after line 687, column 21

  1. BOOL YYCGColorSpaceIsDeviceRGB(CGColorSpaceRef space)
  2. {
  3. return space && CFEqual(space, YYCGColorSpaceGetDeviceRGB());
  4. }

tq/YYKit/Image/YYImageCoder.m:1005: error: MEMORY_LEAK memory dynamically allocated to tmp.data by call to malloc() at line 987, column 16 is not reachable after line 1005, column 5

  1. if (!tmpProvider)
  2. goto fail;
  3. tmp.data = NULL; // hold by provider
  4. tmpImage = CGImageCreate(destWidth, destHeight, 8, 32, destBytesPerRow, YYCGColorSpaceGetDeviceRGB(), kCGImageAlphaFirst | kCGBitmapByteOrderDefault, tmpProvider, NULL, false, kCGRenderingIntentDefault);
  5. if (!tmpImage)

tq/YYKit/Image/YYImageCoder.m:934: error: MEMORY_LEAK memory dynamically allocated by call to YYCGColorSpaceGetDeviceRGB() at line 934, column 81 is not reachable after line 934, column 9

  1. CGBitmapInfo bitmapInfo = kCGBitmapByteOrder32Host;
  2. bitmapInfo |= hasAlpha ? kCGImageAlphaPremultipliedFirst : kCGImageAlphaNoneSkipFirst;
  3.     CGContextRef context = CGBitmapContextCreate(NULL, width, height, 8, 0, YYCGColorSpaceGetDeviceRGB(), bitmapInfo);
  4. if (!context)
  5. return NULL;

tq/YYKit/Image/YYWebImageOperation.m:35: error: MEMORY_LEAK memory dynamically allocated by call to YYCGColorSpaceGetDeviceRGB() at line 35, column 64 is not reachable after line 35, column 5

  1. size_t height = CGImageGetHeight(image);
  2. if (width == 0 || height == 0) return NO;
  3. CGContextRef ctx = CGBitmapContextCreate(NULL, 1, 1, 8, 0, YYCGColorSpaceGetDeviceRGB(), kCGImageAlphaPremultipliedFirst | kCGBitmapByteOrderDefault);
  4. if (!ctx) return NO;
  5. CGContextDrawImage(ctx, CGRectMake( -(int)width + 1, 0, width, height), image);

tq/YYKit/Model/YYClassInfo.m:260: error: NULL_DEREFERENCE pointer self last assigned on line 259 could be null and is dereferenced at line 260, column 5

  1. if (!cls) return nil;
  2. self = [super init];
  3. _cls = cls;
  4. _superCls = class_getSuperclass(cls);
  5. _isMeta = class_isMetaClass(cls);

tq/YYKit/Model/YYClassInfo.m:98: error: NULL_DEREFERENCE pointer self last assigned on line 97 could be null and is dereferenced at line 98, column 5

  1. if (!ivar) return nil;
  2. self = [super init];
  3. _ivar = ivar;
  4. const char *name = ivar_getName(ivar);
  5. if (name) {

tq/YYKit/Model/YYClassInfo.m:119: error: NULL_DEREFERENCE pointer self last assigned on line 118 could be null and is dereferenced at line 119, column 5

  1. if (!method) return nil;
  2. self = [super init];
  3. _method = method;
  4. _sel = method_getName(method);
  5. _imp = method_getImplementation(method);

tq/YYKit/Model/YYClassInfo.m:156: error: NULL_DEREFERENCE pointer self last assigned on line 155 could be null and is dereferenced at line 156, column 5

  1. if (!property) return nil;
  2. self = [super init];
  3. _property = property;
  4. const char *name = property_getName(property);
  5. if (name) {

tq/YYKit/Utility/YYDispatchQueuePool.m:170: error: NULL_DEREFERENCE pointer self last assigned on line 168 could be null and is dereferenced at line 170, column 5

  1. self = [super init];
  2. if (!context) return nil;
  3. self->_context = context;
  4. _name = context->name ? [NSString stringWithUTF8String:context->name] : nil;
  5. return self;

tq/YYKit/Utility/YYDispatchQueuePool.m:178: error: NULL_DEREFERENCE pointer self last assigned on line 177 could be null and is dereferenced at line 178, column 5

  1. if (queueCount == 0 || queueCount > MAX_QUEUE_COUNT) return nil;
  2. self = [super init];
  3. _context = YYDispatchContextCreate(name.UTF8String, (uint32_t)queueCount, qos);
  4. if (!_context) return nil;
  5. _name = name;

tq/YYKit/Image/YYImageCoder.m:2432: error: MEMORY_LEAK memory dynamically allocated by call to YYCGColorSpaceGetDeviceRGB() at line 2432, column 75 is not reachable after line 2432, column 9

  1. if (!_blendCanvas) {
  2. _blendFrameIndex = NSNotFound;
  3.     _blendCanvas = CGBitmapContextCreate(NULL, _width, _height, 8, 0, YYCGColorSpaceGetDeviceRGB(), kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst);
  4. }
  5. BOOL suc = _blendCanvas != NULL;

tq/YYKit/Image/YYImageCoder.m:2281: error: MEMORY_LEAK memory dynamically allocated by call to YYCGColorSpaceGetDeviceRGB() at line 2281, column 91 is not reachable after line 2281, column 17

  1. }
  2. } else {
  3.             CGContextRef context = CGBitmapContextCreate(NULL, _width, _height, 8, 0, YYCGColorSpaceGetDeviceRGB(), kCGBitmapByteOrder32Host | kCGImageAlphaPremultipliedFirst);
  4. if (context) {
  5. CGContextDrawImage(context, CGRectMake(0, _height - height, width, height), imageRef);

tq/YYKit/Image/YYImageCoder.m:1727: error: NULL_DEREFERENCE pointer self last assigned on line 1724 could be null and is dereferenced at line 1727, column 5

  1. if (scale <= 0)
  2. scale = 1;
  3. _scale = scale;
  4. _framesLock = dispatch_semaphore_create(1);
  5. pthread_mutex_init_recursive(&_lock, true);

tq/YYKit/Cache/YYKVStorage.m:793: error: MEMORY_LEAK memory dynamically allocated to self->_dbStmtCache by call to _dbOpen at line 789, column 10 is not reachable after line 793, column 14

  1. [self _dbClose];
  2. [self _reset]; // rebuild
  3.     if (![self _dbOpen] || ![self _dbInitialize]) {
  4. [self _dbClose];
  5. NSLog(@"YYKVStorage init error: fail to open sqlite db.");

tq/YYKit/Cache/YYKVStorage.m:765: error: NULL_DEREFERENCE pointer self last assigned on line 764 could be null and is dereferenced at line 765, column 5

  1. self = [super init];
  2. _path = path.copy;
  3. _type = type;
  4. _dataPath = [path stringByAppendingPathComponent:kDataDirectoryName];

tq/YYKit/Text/YYLabel.m:524: error: NULL_DEREFERENCE pointer self last assigned on line 520 could be null and is dereferenced at line 524, column 9

  1. YYTextContainer *innerContainer = [aDecoder decodeObjectForKey:@"innerContainer"];
  2. if (innerContainer) {
  3.     _innerContainer = innerContainer;
  4. } else {
  5. _innerContainer.size = self.bounds.size;

tq/YYKit/Cache/YYMemoryCache.m:201: error: MEMORY_LEAK memory dynamically allocated by call to block at line 201, column 5 is not reachable after line 201, column 5

    • (void)_trimInBackground {
  1. dispatch_async(_queue, ^{
  2. [self _trimToCost:self->_costLimit];
  3. [self _trimToCount:self->_countLimit];

tq/YYKit/Cache/YYMemoryCache.m:334: error: NULL_DEREFERENCE pointer self last assigned on line 332 could be null and is dereferenced at line 334, column 5

  1. self = super.init;
  2. pthread_mutex_init(&_lock, NULL);
  3. _lru = [_YYLinkedMap new];
  4. _queue = dispatch_queue_create("com.ibireme.cache.memory", DISPATCH_QUEUE_SERIAL);

tq/YYKit/Text/String/YYTextAttribute.m:357: error: NULL_DEREFERENCE pointer self last assigned on line 356 could be null and is dereferenced at line 357, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super init];
  2. _content = [aDecoder decodeObjectForKey:@"content"];
  3. _contentInsets = ((NSValue *)[aDecoder decodeObjectForKey:@"contentInsets"]).UIEdgeInsetsValue;
  4. _userInfo = [aDecoder decodeObjectForKey:@"userInfo"];

tq/YYKit/Text/String/YYTextAttribute.m:128: error: NULL_DEREFERENCE pointer self last assigned on line 127 could be null and is dereferenced at line 128, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super init];
  2. _string = [aDecoder decodeObjectForKey:@"string"];
  3. return self;
  4. }

tq/YYKit/Text/String/YYTextAttribute.m:155: error: NULL_DEREFERENCE pointer self last assigned on line 154 could be null and is dereferenced at line 155, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super init];
  2. _deleteConfirm = ((NSNumber *)[aDecoder decodeObjectForKey:@"deleteConfirm"]).boolValue;
  3. return self;
  4. }

tq/YYKit/Text/String/YYTextAttribute.m:314: error: NULL_DEREFERENCE pointer self last assigned on line 313 could be null and is dereferenced at line 314, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super init];
  2. _lineStyle = ((NSNumber *)[aDecoder decodeObjectForKey:@"lineStyle"]).unsignedIntegerValue;
  3. _strokeWidth = ((NSNumber *)[aDecoder decodeObjectForKey:@"strokeWidth"]).doubleValue;
  4. _strokeColor = [aDecoder decodeObjectForKey:@"strokeColor"];

tq/YYKit/Text/Component/YYTextLayout.m:172: error: NULL_DEREFERENCE pointer self last assigned on line 171 could be null and is dereferenced at line 172, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [self init];
  2. _size = ((NSValue *)[aDecoder decodeObjectForKey:@"size"]).CGSizeValue;
  3. _insets = ((NSValue *)[aDecoder decodeObjectForKey:@"insets"]).UIEdgeInsetsValue;
  4. _path = [aDecoder decodeObjectForKey:@"path"];

tq/YYKit/Text/String/YYTextAttribute.m:235: error: NULL_DEREFERENCE pointer self last assigned on line 234 could be null and is dereferenced at line 235, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _style = YYTextLineStyleSingle;
  3. return self;
  4. }

tq/YYKit/Text/String/YYTextAttribute.m:416: error: NULL_DEREFERENCE pointer self last assigned on line 413 could be null and is dereferenced at line 416, column 9

  1. NSData *data = [aDecoder decodeObjectForKey:@"attributes"];
  2. @try {
  3.     _attributes = [YYTextUnarchiver unarchiveObjectWithData:data];
  4. }
  5. @catch (NSException *exception) {

tq/YYKit/Text/String/YYTextRubyAnnotation.m:73: error: NULL_DEREFERENCE pointer self last assigned on line 72 could be null and is dereferenced at line 73, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [self init];
  2. _alignment = ((NSNumber *)[aDecoder decodeObjectForKey:@"alignment"]).intValue;
  3. _overhang = ((NSNumber *)[aDecoder decodeObjectForKey:@"overhang"]).intValue;
  4. _sizeFactor = ((NSNumber *)[aDecoder decodeObjectForKey:@"sizeFactor"]).intValue;

tq/YYKit/Text/String/YYTextRunDelegate.m:55: error: NULL_DEREFERENCE pointer self last assigned on line 54 could be null and is dereferenced at line 55, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super init];
  2. _ascent = ((NSNumber *)[aDecoder decodeObjectForKey:@"ascent"]).floatValue;
  3. _descent = ((NSNumber *)[aDecoder decodeObjectForKey:@"descent"]).floatValue;
  4. _width = ((NSNumber *)[aDecoder decodeObjectForKey:@"width"]).floatValue;

tq/YYKit/Text/String/YYTextAttribute.m:212: error: NULL_DEREFERENCE pointer self last assigned on line 211 could be null and is dereferenced at line 212, column 5

    • (id)initWithCoder:(NSCoder *)aDecoder {
  1. self = [super init];
  2. _color = [aDecoder decodeObjectForKey:@"color"];
  3. _radius = ((NSNumber *)[aDecoder decodeObjectForKey:@"radius"]).floatValue;
  4. _offset = ((NSValue *)[aDecoder decodeObjectForKey:@"offset"]).CGSizeValue;

tq/YYKit/Text/String/YYTextParser.m:316: error: NULL_DEREFERENCE pointer self last assigned on line 315 could be null and is dereferenced at line 316, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _lock = dispatch_semaphore_create(1);
  3. return self;
  4. }

tq/YYKit/Text/String/YYTextParser.m:75: error: NULL_DEREFERENCE pointer self last assigned on line 74 could be null and is dereferenced at line 75, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _fontSize = 14;
  3. _headerFontSize = 20;
  4. [self _updateFonts];

tq/YYKit/Text/YYTextView.m:1327: error: NULL_DEREFERENCE pointer start last assigned on line 1325 could be null and is dereferenced by call to rangeWithStart:end: at line 1327, column 12

  1. YYTextPosition *start = [self _correctedTextPosition:range.start];
  2. YYTextPosition *end = [self _correctedTextPosition:range.end];
  3. return [YYTextRange rangeWithStart:start end:end];
  4. }

tq/YYKit/Utility/YYTimer.m:48: error: NULL_DEREFERENCE pointer self last assigned on line 47 could be null and is dereferenced at line 48, column 5

  1. repeats:(BOOL)repeats {
  2. self = [super init];
  3. _repeats = repeats;
  4. _timeInterval = interval;
  5. _valid = YES;

tq/YYKit/Cache/YYMemoryCache.m:92: error: NULL_DEREFERENCE pointer self last assigned on line 91 could be null and is dereferenced at line 92, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _dic = CFDictionaryCreateMutable(CFAllocatorGetDefault(), 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks);
  3. _releaseOnMainThread = NO;
  4. _releaseAsynchronously = YES;

tq/YYKit/Text/Component/YYTextMagnifier.m:33: error: NULL_DEREFERENCE pointer self last assigned on line 32 could be null and is dereferenced at line 33, column 5

    • (instancetype)initWithFrame:(CGRect)frame {
  1. self = [super initWithFrame:frame];
  2. _contentView = [UIImageView new];
  3. _contentView.frame = CGRectMake(kPadding, kPadding, kDiameter, kDiameter);
  4. _contentView.layer.cornerRadius = kDiameter / 2;

tq/YYKit/Text/Component/YYTextMagnifier.m:178: error: NULL_DEREFERENCE pointer self last assigned on line 177 could be null and is dereferenced at line 178, column 5

    • (instancetype)initWithFrame:(CGRect)frame {
  1. self = [super initWithFrame:frame];
  2. _contentView = [UIImageView new];
  3. _contentView.frame = CGRectMake(kPadding, kPadding, kSize.width - 2 * kPadding, kHeight);
  4. _contentView.layer.cornerRadius = kRadius;

tq/YYKit/Image/Categories/UIButton+YYWebImage.m:51: error: NULL_DEREFERENCE pointer self last assigned on line 50 could be null and is dereferenced at line 51, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _lock = dispatch_semaphore_create(1);
  3. _dic = [NSMutableDictionary new];
  4. return self;

tq/YYKit/Image/Categories/_YYWebImageSetter.m:30: error: NULL_DEREFERENCE pointer self last assigned on line 29 could be null and is dereferenced at line 30, column 5

    • (instancetype)init {
  1. self = [super init];
  2. _lock = dispatch_semaphore_create(1);
  3. return self;
  4. }

tq/Log/LogServer/GCDWebServer/Responses/GCDWebServerStreamedResponse.m:55: warning: PARAMETER_NOT_NULL_CHECKED Parameter completionBlock is not checked for null, there could be a null pointer dereference: pointer completionBlock could be null and is dereferenced at line 55, column 5

  1. NSError* error = nil;
  2. NSData* data = block(&error);
  3. completionBlock(data, error);
  4. }];

tq/Log/LogServer/GCDWebServer/Core/GCDWebServer.m:897: warning: PARAMETER_NOT_NULL_CHECKED Parameter completionBlock is not checked for null, there could be a null pointer dereference: pointer completionBlock could be null and is dereferenced at line 897, column 5

    • (void)addDefaultHandlerForMethod:(NSString*)method requestClass:(Class)aClass processBlock:(GCDWebServerProcessBlock)block {
  1. [self addDefaultHandlerForMethod:method requestClass:aClass asyncProcessBlock:^(GCDWebServerRequest* request, GCDWebServerCompletionBlock completionBlock) {
  2. completionBlock(block(request));
  3. }];
  4. }

tq/Log/LogServer/GCDWebServer/Core/GCDWebServer.m:914: warning: PARAMETER_NOT_NULL_CHECKED Parameter completionBlock is not checked for null, there could be a null pointer dereference: pointer completionBlock could be null and is dereferenced at line 914, column 5

    • (void)addHandlerForMethod:(NSString)method path:(NSString)path requestClass:(Class)aClass processBlock:(GCDWebServerProcessBlock)block {
  1. [self addHandlerForMethod:method path:path requestClass:aClass asyncProcessBlock:^(GCDWebServerRequest* request, GCDWebServerCompletionBlock completionBlock) {
  2. completionBlock(block(request));
  3. }];
  4. }

tq/Log/LogServer/GCDWebServer/Core/GCDWebServer.m:938: warning: PARAMETER_NOT_NULL_CHECKED Parameter completionBlock is not checked for null, there could be a null pointer dereference: pointer completionBlock could be null and is dereferenced at line 938, column 5

    • (void)addHandlerForMethod:(NSString)method pathRegex:(NSString)regex requestClass:(Class)aClass processBlock:(GCDWebServerProcessBlock)block {
  1. [self addHandlerForMethod:method pathRegex:regex requestClass:aClass asyncProcessBlock:^(GCDWebServerRequest* request, GCDWebServerCompletionBlock completionBlock) {
  2. completionBlock(block(request));
  3. }];
  4. }

tq/Log/LogServer/GCDWebServer/Core/GCDWebServer.m:358: warning: PARAMETER_NOT_NULL_CHECKED Parameter completionBlock is not checked for null, there could be a null pointer dereference: pointer completionBlock could be null and is dereferenced at line 358, column 5

    • (void)addHandlerWithMatchBlock:(GCDWebServerMatchBlock)matchBlock processBlock:(GCDWebServerProcessBlock)processBlock {
  1. [self addHandlerWithMatchBlock:matchBlock asyncProcessBlock:^(GCDWebServerRequest* request, GCDWebServerCompletionBlock completionBlock) {
  2. completionBlock(processBlock(request));
  3. }];
  4. }

tq/Log/LogServer/GCDWebServer/Core/GCDWebServer.m:325: error: MEMORY_LEAK memory dynamically allocated by call to block at line 325, column 7 is not reachable after line 325, column 7

  1. _activeConnections -= 1;
  2. if (_activeConnections == 0) {
  3.   dispatch_async(dispatch_get_main_queue(), ^{
  4. if ((_disconnectDelay > 0.0) && (_source4 != NULL)) {
  5. if (_disconnectTimer) {

tq/YYKit/Text/YYLabel.m:1114: warning: PARAMETER_NOT_NULL_CHECKED Parameter isCancelled is not checked for null, there could be a null pointer dereference: pointer isCancelled could be null and is dereferenced at line 1114, column 13

  1. task.display = ^(CGContextRef context, CGSize size, BOOL (^isCancelled)(void)) {
  2.     if (isCancelled()) return;
  3. if (text.length == 0) return;

tq/YYKit/Base/YYKitMacro.h:298: warning: PARAMETER_NOT_NULL_CHECKED Parameter block is not checked for null, there could be a null pointer dereference: pointer block could be null and is dereferenced at line 298, column 9

  1. block();
  2. } else {
  3.     dispatch_async(dispatch_get_main_queue(), block);
  4. }
  5. }

tq/YYKit/Base/YYKitMacro.h:296: warning: PARAMETER_NOT_NULL_CHECKED Parameter block is not checked for null, there could be a null pointer dereference: pointer block could be null and is dereferenced at line 296, column 9

  1. static inline void dispatch_async_on_main_queue(void (^block)()) {
  2. if (pthread_main_np()) {
  3.     block();
  4. } else {
  5. dispatch_async(dispatch_get_main_queue(), block);

tq/YYKit/Model/NSObject+YYModel.m:790: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 790, column 9. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. NSNumber *num = YYNSNumberCreateFromID(value);
  2. ModelSetNumberToProperty(model, num, meta);
  3.     if (num) [num class]; // hold the number
  4. } else if (meta->_nsType) {
  5. if (value == (id)kCFNull) {

tq/YYKit/Model/NSObject+YYModel.m:115: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 115, column 9. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. if ([value isKindOfClass:[NSString class]]) {
  2. NSNumber *num = dic[value];
  3.     if (num) {
  4. if (num == (id)kCFNull) return nil;
  5. return num;

tq/YYKit/Text/String/YYTextAttribute.m:109: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 109, column 5. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. });
  2. NSNumber *num = dic[name];
  3. if (num) return num.integerValue;
  4. return YYTextAttributeTypeNone;
  5. }

tq/YYKit/Text/Component/YYTextLayout.m:2903: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 2903, column 37. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. color = YYTextGetCGColor(color);
  2. }
  3.             CGFloat thickness = underline.width ? underline.width.floatValue : lineThickness;
  4. YYTextShadow *shadow = underline.shadow;
  5. while (shadow) {

tq/YYKit/Text/Component/YYTextLayout.m:2932: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 2932, column 37. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. color = YYTextGetCGColor(color);
  2. }
  3.             CGFloat thickness = strikethrough.width ? strikethrough.width.floatValue : lineThickness;
  4. YYTextShadow *shadow = underline.shadow;
  5. while (shadow) {

tq/YYKit/Text/Component/YYTextLayout.m:2253: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 2253, column 13. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. CGContextSaveGState(context); {
  2. CGContextSetFillColorWithColor(context, fillColor);
  3.         if (!strokeWidth || strokeWidth.floatValue == 0) {
  4. CGContextSetTextDrawingMode(context, kCGTextFill);
  5. } else {

tq/Log/LogServer/GCDWebServer/Core/GCDWebServer.h:289: warning: ASSIGN_POINTER_WARNING Property delegate is a pointer type marked with the assign attribute at line 289, column 1. Use a different attribute like strong or weak.

    • Sets the delegate for the server.
  1. */
  2. @property(nonatomic, assign) id delegate;

  3. /**

tq/YYKit/Model/YYClassInfo.h:151: warning: ASSIGN_POINTER_WARNING Property metaCls is a pointer type marked with the assign attribute at line 151, column 1. Use a different attribute like strong or weak.

  1. @property (nonatomic, assign, readonly) Class cls; ///< class object
  2. @property (nullable, nonatomic, assign, readonly) Class superCls; ///< super class object
  3. @property (nullable, nonatomic, assign, readonly) Class metaCls; ///< class's meta class object

  4. @property (nonatomic, readonly) BOOL isMeta; ///< whether this class is meta class
  5. @property (nonatomic, strong, readonly) NSString *name; ///< class name

tq/YYKit/Model/YYClassInfo.h:149: warning: ASSIGN_POINTER_WARNING Property cls is a pointer type marked with the assign attribute at line 149, column 1. Use a different attribute like strong or weak.

  1. */
  2. @interface YYClassInfo : NSObject
  3. @property (nonatomic, assign, readonly) Class cls; ///< class object

  4. @property (nullable, nonatomic, assign, readonly) Class superCls; ///< super class object
  5. @property (nullable, nonatomic, assign, readonly) Class metaCls; ///< class's meta class object

tq/YYKit/Model/YYClassInfo.h:130: warning: ASSIGN_POINTER_WARNING Property cls is a pointer type marked with the assign attribute at line 130, column 1. Use a different attribute like strong or weak.

  1. @property (nonatomic, strong, readonly) NSString *typeEncoding; ///< property's encoding value
  2. @property (nonatomic, strong, readonly) NSString *ivarName; ///< property's ivar name
  3. @property (nullable, nonatomic, assign, readonly) Class cls; ///< may be nil

  4. @property (nullable, nonatomic, strong, readonly) NSArray<NSString > protocols; ///< may nil
  5. @property (nonatomic, assign, readonly) SEL getter; ///< getter (nonnull)

tq/YYKit/Model/YYClassInfo.h:150: warning: ASSIGN_POINTER_WARNING Property superCls is a pointer type marked with the assign attribute at line 150, column 1. Use a different attribute like strong or weak.

  1. @interface YYClassInfo : NSObject
  2. @property (nonatomic, assign, readonly) Class cls; ///< class object
  3. @property (nullable, nonatomic, assign, readonly) Class superCls; ///< super class object

  4. @property (nullable, nonatomic, assign, readonly) Class metaCls; ///< class's meta class object
  5. @property (nonatomic, readonly) BOOL isMeta; ///< whether this class is meta class

tq/YYKit/Text/YYTextView.m:771: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 771, column 41. Accessing an ivar of an atomic property makes the property nonatomic

  1. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  2. if ([YYTextKeyboardManager defaultManager].keyboardVisible) {
  3.         [self _scrollRangeToVisible:_selectedTextRange];
  4. } else {
  5. [self _restoreInsetsAnimated:YES];

tq/YYKit/Image/YYImageCache.m:251: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 251, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (type & YYImageCacheTypeMemory) {
  2.         image = [_memoryCache objectForKey:key];
  3. if (image) {
  4. dispatch_async(dispatch_get_main_queue(), ^{

tq/YYKit/Cache/YYMemoryCache.m:202: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _costLimit of an atomic property at line 202, column 27. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)_trimInBackground {
  1. dispatch_async(_queue, ^{
  2.     [self _trimToCost:self->_costLimit];
  3. [self _trimToCount:self->_countLimit];
  4. [self _trimToAge:self->_ageLimit];

tq/YYKit/Cache/YYCache.m:89: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 89, column 29. Accessing an ivar of an atomic property makes the property nonatomic

  1. } else {
  2. [_diskCache objectForKey:key withBlock:^(NSString *key, id object) {
  3.         if (object && ![_memoryCache objectForKey:key]) {
  4. [_memoryCache setObject:object forKey:key];
  5. }

tq/YYKit/Cache/YYCache.m:90: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 90, column 18. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_diskCache objectForKey:key withBlock:^(NSString *key, id object) {
  2. if (object && ![_memoryCache objectForKey:key]) {
  3.             [_memoryCache setObject:object forKey:key];
  4. }
  5. block(key, object);

tq/YYKit/Cache/YYMemoryCache.m:203: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _countLimit of an atomic property at line 203, column 28. Accessing an ivar of an atomic property makes the property nonatomic

  1. dispatch_async(_queue, ^{
  2. [self _trimToCost:self->_costLimit];
  3.     [self _trimToCount:self->_countLimit];
  4. [self _trimToAge:self->_ageLimit];
  5. });

tq/YYKit/Image/YYImageCache.m:261: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 261, column 33. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (type & YYImageCacheTypeDisk) {
  2.         NSData* data = (id)[_diskCache objectForKey:key];
  3. image = [self imageFromData:data];
  4. if (image) {

tq/YYKit/Image/YYImageCache.m:264: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 264, column 18. Accessing an ivar of an atomic property makes the property nonatomic

  1. image = [self imageFromData:data];
  2. if (image) {
  3.             [_memoryCache setObject:image forKey:key];
  4. dispatch_async(dispatch_get_main_queue(), ^{
  5. block(image, YYImageCacheTypeDisk);

tq/YYKit/Cache/YYMemoryCache.m:204: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _ageLimit of an atomic property at line 204, column 26. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _trimToCost:self->_costLimit];
  2. [self _trimToCount:self->_countLimit];
  3.     [self _trimToAge:self->_ageLimit];
  4. });
  5. }

tq/YYKit/Image/YYImageCache.m:288: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 288, column 29. Accessing an ivar of an atomic property makes the property nonatomic

  1. return;
  2. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  3.     NSData* data = (id)[_diskCache objectForKey:key];
  4. dispatch_async(dispatch_get_main_queue(), ^{
  5. block(data);

tq/YYKit/Cache/YYMemoryCache.m:448: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _costLimit of an atomic property at line 448, column 30. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_lru->_totalCost > _costLimit) {
  2. dispatch_async(_queue, ^{
  3.         [self trimToCost:_costLimit];
  4. });
  5. }

tq/YYKit/Text/YYTextView.m:1270: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1270, column 58. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. } else {
  3.     NSString *string = [_innerText plainTextForRange:_selectedTextRange.asRange];
  4. if (string.length) {
  5. [UIPasteboard generalPasteboard].string = string;

tq/YYKit/Text/YYTextView.m:1265: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1265, column 77. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)_copySelectedTextToPasteboard {
  1. if (_allowsCopyAttributedString) {
  2.     NSAttributedString *text = [_innerText attributedSubstringFromRange:_selectedTextRange.asRange];
  3. if (text.length) {
  4. [UIPasteboard generalPasteboard].attributedString = text;

tq/YYKit/Text/YYTextView.m:2997: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2997, column 54. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _hideMenu];
  2. NSString *string = [_innerText plainTextForRange:_selectedTextRange.asRange];
  3. if (string.length == 0) return;
  4. BOOL resign = [self resignFirstResponder];

tq/YYKit/Cache/YYDiskCache.m:157: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _customFileNameBlock of an atomic property at line 157, column 25. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSString* LFN_file_name = nil;
  2. if (_customFileNameBlock)
  3.     LFN_file_name = _customFileNameBlock(key);
  4. if (!LFN_file_name)
  5. LFN_file_name = key.md5String;

tq/YYKit/Cache/YYDiskCache.m:156: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _customFileNameBlock of an atomic property at line 156, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. {
  2. NSString* LFN_file_name = nil;
  3. if (_customFileNameBlock)
  4. LFN_file_name = _customFileNameBlock(key);
  5. if (!LFN_file_name)

tq/YYKit/Text/YYTextView.m:1940: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1940, column 5. Accessing an ivar of an atomic property makes the property nonatomic

  1. // UITextInput
  2. _selectedTextRange = [YYTextRange defaultRange];
  3. _markedTextRange = nil;
  4. _markedTextStyle = nil;

tq/YYKit/Text/YYTextView.m:1493: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1493, column 28. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (self.textParser) {
  2. YYTextRange *oldTextRange = _selectedTextRange;
  3.     NSRange newRange = _selectedTextRange.asRange;
  4. [_inputDelegate textWillChange:self];

tq/YYKit/Text/YYTextView.m:1492: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1492, column 37. Accessing an ivar of an atomic property makes the property nonatomic

    • (BOOL)_parseText {
  1. if (self.textParser) {
  2.     YYTextRange *oldTextRange = _selectedTextRange;
  3. NSRange newRange = _selectedTextRange.asRange;

tq/YYKit/Text/YYTextView.m:1504: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1504, column 13. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (![oldTextRange isEqual:newTextRange]) {
  2. [_inputDelegate selectionWillChange:self];
  3.         _selectedTextRange = newTextRange;
  4. [_inputDelegate selectionDidChange:self];
  5. }

tq/YYKit/Text/YYTextView.m:1420: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1420, column 46. Accessing an ivar of an atomic property makes the property nonatomic

  1. // target range contains selected range
  2. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(range.start.offset + text.length, 0)];
  3.         } else if (range.start.offset >= _selectedTextRange.start.offset &&
  4. range.end.offset <= _selectedTextRange.end.offset) {
  5. // target range inside selected range

tq/YYKit/Text/YYTextView.m:1413: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1413, column 40. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (range.end.offset <= _selectedTextRange.start.offset) {
  2. NSInteger offset = (NSInteger)text.length - (NSInteger)range.asRange.length;
  3.                 NSRange newRange = _selectedTextRange.asRange;
  4. newRange.location += offset;
  5. _selectedTextRange = [YYTextRange rangeWithRange:newRange];

tq/YYKit/Text/YYTextView.m:1426: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1426, column 17. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSRange newRange = _selectedTextRange.asRange;
  2. newRange.length += offset;
  3.             _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  4. } else {
  5. // interleaving

tq/YYKit/Text/YYTextView.m:1399: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1399, column 38. Accessing an ivar of an atomic property makes the property nonatomic

  1. /// The caller should make sure the range and text are valid before call this method.
    • (void)_replaceRange:(YYTextRange )range withText:(NSString )text notifyToDelegate:(BOOL)notify{
  2. if (NSEqualRanges(range.asRange, _selectedTextRange.asRange)) {
  3. if (notify) [_inputDelegate selectionWillChange:self];
  4. NSRange newRange = NSMakeRange(0, 0);

tq/YYKit/Text/YYTextView.m:1435: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1435, column 40. Accessing an ivar of an atomic property makes the property nonatomic

  1. _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  2. } else {
  3.                 NSRange newRange = _selectedTextRange.asRange;
  4. newRange.length -= unionRange.length;
  5. _selectedTextRange = [YYTextRange rangeWithRange:newRange];

tq/YYKit/Text/YYTextView.m:1421: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1421, column 44. Accessing an ivar of an atomic property makes the property nonatomic

  1. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(range.start.offset + text.length, 0)];
  2. } else if (range.start.offset >= _selectedTextRange.start.offset &&
  3.                    range.end.offset <= _selectedTextRange.end.offset) {
  4. // target range inside selected range
  5. NSInteger offset = (NSInteger)text.length - (NSInteger)range.asRange.length;

tq/YYKit/Text/YYTextView.m:1440: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1440, column 13. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. }
  3.         _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  4. if (notify) [_inputDelegate selectionDidChange:self];
  5. }

tq/YYKit/Text/YYTextView.m:1424: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1424, column 36. Accessing an ivar of an atomic property makes the property nonatomic

  1. // target range inside selected range
  2. NSInteger offset = (NSInteger)text.length - (NSInteger)range.asRange.length;
  3.             NSRange newRange = _selectedTextRange.asRange;
  4. newRange.length += offset;
  5. _selectedTextRange = [YYTextRange rangeWithRange:newRange];

tq/YYKit/Text/YYTextView.m:1417: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1417, column 45. Accessing an ivar of an atomic property makes the property nonatomic

  1. _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  2. }
  3.         } else if (unionRange.length == _selectedTextRange.asRange.length) {
  4. // target range contains selected range
  5. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(range.start.offset + text.length, 0)];

tq/YYKit/Text/YYTextView.m:1403: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1403, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSRange newRange = NSMakeRange(0, 0);
  2. newRange.location = _selectedTextRange.start.offset + text.length;
  3.     _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  4. if (notify) [_inputDelegate selectionDidChange:self];
  5. } else {

tq/YYKit/Text/YYTextView.m:1419: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1419, column 17. Accessing an ivar of an atomic property makes the property nonatomic

  1. } else if (unionRange.length == _selectedTextRange.asRange.length) {
  2. // target range contains selected range
  3.             _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(range.start.offset + text.length, 0)];
  4. } else if (range.start.offset >= _selectedTextRange.start.offset &&
  5. range.end.offset <= _selectedTextRange.end.offset) {

tq/YYKit/Text/YYTextView.m:1402: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1402, column 29. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (notify) [_inputDelegate selectionWillChange:self];
  2. NSRange newRange = NSMakeRange(0, 0);
  3.     newRange.location = _selectedTextRange.start.offset + text.length;
  4. _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  5. if (notify) [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:1437: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1437, column 21. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSRange newRange = _selectedTextRange.asRange;
  2. newRange.length -= unionRange.length;
  3.                 _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  4. }
  5. }

tq/YYKit/Text/YYTextView.m:1429: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1429, column 42. Accessing an ivar of an atomic property makes the property nonatomic

  1. } else {
  2. // interleaving
  3.             if (range.start.offset < _selectedTextRange.start.offset) {
  4. NSRange newRange = _selectedTextRange.asRange;
  5. newRange.location = range.start.offset + text.length;

tq/YYKit/Text/YYTextView.m:1411: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1411, column 41. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (unionRange.length == 0) {
  2. // no intersection
  3.             if (range.end.offset <= _selectedTextRange.start.offset) {
  4. NSInteger offset = (NSInteger)text.length - (NSInteger)range.asRange.length;
  5. NSRange newRange = _selectedTextRange.asRange;

tq/YYKit/Text/YYTextView.m:1433: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1433, column 21. Accessing an ivar of an atomic property makes the property nonatomic

  1. newRange.location = range.start.offset + text.length;
  2. newRange.length -= unionRange.length;
  3.                 _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  4. } else {
  5. NSRange newRange = _selectedTextRange.asRange;

tq/YYKit/Text/YYTextView.m:1408: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1408, column 54. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (range.asRange.length != text.length) {
  2. if (notify) [_inputDelegate selectionWillChange:self];
  3.         NSRange unionRange = NSIntersectionRange(_selectedTextRange.asRange, range.asRange);
  4. if (unionRange.length == 0) {
  5. // no intersection

tq/YYKit/Text/YYTextView.m:1440: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1440, column 60. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. }
  3.         _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  4. if (notify) [_inputDelegate selectionDidChange:self];
  5. }

tq/YYKit/Text/YYTextView.m:1430: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1430, column 40. Accessing an ivar of an atomic property makes the property nonatomic

  1. // interleaving
  2. if (range.start.offset < _selectedTextRange.start.offset) {
  3.                 NSRange newRange = _selectedTextRange.asRange;
  4. newRange.location = range.start.offset + text.length;
  5. newRange.length -= unionRange.length;

tq/YYKit/Text/YYTextView.m:1415: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1415, column 21. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSRange newRange = _selectedTextRange.asRange;
  2. newRange.location += offset;
  3.                 _selectedTextRange = [YYTextRange rangeWithRange:newRange];
  4. }
  5. } else if (unionRange.length == _selectedTextRange.asRange.length) {

tq/YYKit/Text/YYTextView.m:1571: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1571, column 97. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_undoStack removeAllObjects];
  2. [_redoStack removeAllObjects];
  3. _YYTextViewUndoObject *object = [_YYTextViewUndoObject objectWithText:_innerText.copy range:_selectedTextRange.asRange];
  4. _lastTypeRange = _selectedTextRange.asRange;
  5. [_undoStack addObject:object];

tq/YYKit/Text/YYTextView.m:1572: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1572, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_redoStack removeAllObjects];
  2. _YYTextViewUndoObject *object = [_YYTextViewUndoObject objectWithText:_innerText.copy range:_selectedTextRange.asRange];
  3. _lastTypeRange = _selectedTextRange.asRange;
  4. [_undoStack addObject:object];
  5. }

tq/YYKit/Text/YYTextView.m:1601: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1601, column 97. Accessing an ivar of an atomic property makes the property nonatomic

  1. if ([lastObject.text isEqualToAttributedString:self.attributedText]) return;
  2. _YYTextViewUndoObject *object = [_YYTextViewUndoObject objectWithText:_innerText.copy range:_selectedTextRange.asRange];
  3. [_redoStack addObject:object];
  4. while (_redoStack.count > _maximumUndoLevel) {

tq/YYKit/Text/YYTextView.m:1587: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1587, column 97. Accessing an ivar of an atomic property makes the property nonatomic

  1. if ([lastObject.text isEqualToAttributedString:self.attributedText]) return;
  2. _YYTextViewUndoObject *object = [_YYTextViewUndoObject objectWithText:_innerText.copy range:_selectedTextRange.asRange];
  3. _lastTypeRange = _selectedTextRange.asRange;
  4. [_undoStack addObject:object];

tq/YYKit/Text/YYTextView.m:1588: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1588, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. _YYTextViewUndoObject *object = [_YYTextViewUndoObject objectWithText:_innerText.copy range:_selectedTextRange.asRange];
  2. _lastTypeRange = _selectedTextRange.asRange;
  3. [_undoStack addObject:object];
  4. while (_undoStack.count > _maximumUndoLevel) {

tq/YYKit/Text/YYTextView.m:678: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 678, column 33. Accessing an ivar of an atomic property makes the property nonatomic

  1. /// Scroll current selected range to visible.
    • (void)_scrollSelectedRangeToVisible {
  2. [self _scrollRangeToVisible:_selectedTextRange];
  3. }

tq/YYKit/Text/YYTextView.m:472: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 472, column 34. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. YYTextRange *selectedRange = _selectedTextRange;
  3. if (_state.trackingTouch && _trackingRange) {
  4. selectedRange = _trackingRange;

tq/YYKit/Image/YYWebImageOperation.m:300: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 300, column 29. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. NSDictionary *object_attribute = [_request.URL resourceValuesForKeys:keys error:nil];
  2. NSNumber *fileSize = object_attribute[NSURLFileSizeKey];
  3.         _expectedSize = fileSize ? fileSize.unsignedIntegerValue : -1;
  4. }

tq/YYKit/Cache/YYDiskCache.m:80: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _autoTrimInterval of an atomic property at line 80, column 63. Accessing an ivar of an atomic property makes the property nonatomic

  1. {
  2. __weak typeof(self) _self = self;
  3. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(_autoTrimInterval * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
  4. __strong typeof(_self) self = _self;
  5. if (!self)

tq/YYKit/Cache/YYMemoryCache.m:192: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _autoTrimInterval of an atomic property at line 192, column 63. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)_trimRecursively {
  1. __weak typeof(self) _self = self;
  2. dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(_autoTrimInterval * NSEC_PER_SEC)), dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_LOW, 0), ^{
  3. __strong typeof(_self) self = _self;
  4. if (!self) return;

tq/YYKit/Text/YYTextView.m:1454: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1454, column 69. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)_updateAttributesHolder {
  1. if (_innerText.length > 0) {
  2.     NSUInteger index = _selectedTextRange.end.offset == 0 ? 0 : _selectedTextRange.end.offset - 1;
  3. NSDictionary *attributes = [_innerText attributesAtIndex:index];
  4. if (!attributes) attributes = @{};

tq/YYKit/Text/YYTextView.m:1454: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1454, column 28. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)_updateAttributesHolder {
  1. if (_innerText.length > 0) {
  2.     NSUInteger index = _selectedTextRange.end.offset == 0 ? 0 : _selectedTextRange.end.offset - 1;
  3. NSDictionary *attributes = [_innerText attributesAtIndex:index];
  4. if (!attributes) attributes = @{};

tq/YYKit/Text/YYTextView.m:226: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 226, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. [text setAttributes:_typingAttributesHolder.attributes]; // add for empty text caret
  2. }
  3. if (_selectedTextRange.end.offset == _innerText.length) {
  4. [_typingAttributesHolder.attributes enumerateKeysAndObjectsUsingBlock:^(NSString key, id value, BOOL stop) {
  5. [text setAttribute:key value:value range:NSMakeRange(_innerText.length, 1)];

tq/YYKit/Text/YYTextView.m:1483: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 1483, column 29. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _setTextColor:color];
  2. [self _setTextAlignment:style.alignment];
  3. [self _setSelectedRange:_selectedTextRange.asRange];
  4. [self _setTypingAttributes:_typingAttributesHolder.attributes];
  5. [self _setAttributedText:_innerText];

tq/YYKit/Text/YYTextView.m:262: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 262, column 34. Accessing an ivar of an atomic property makes the property nonatomic

  1. BOOL containsDot = NO;
  2. YYTextRange *selectedRange = _selectedTextRange;
  3. if (_state.trackingTouch && _trackingRange) {
  4. selectedRange = _trackingRange;

tq/YYKit/Text/YYTextView.m:420: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 420, column 72. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. YYTextRange *newRange = [YYTextRange rangeWithStart:(isStart ? position : _selectedTextRange.start)
  3.                                                     end:(isStart ? _selectedTextRange.end : position)];
  4. _trackingRange = newRange;
  5. }

tq/YYKit/Text/YYTextView.m:419: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 419, column 83. Accessing an ivar of an atomic property makes the property nonatomic

  1. position = [YYTextPosition positionWithOffset:_innerText.length];
  2. }
  3.     YYTextRange *newRange = [YYTextRange rangeWithStart:(isStart ? position : _selectedTextRange.start)
  4. end:(isStart ? _selectedTextRange.end : position)];
  5. _trackingRange = newRange;

tq/YYKit/Text/YYTextView.m:413: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 413, column 99. Accessing an ivar of an atomic property makes the property nonatomic

  1. YYTextPosition *position = [_innerLayout positionForPoint:magPoint
  2. oldPosition:(isStart ? _selectedTextRange.start : _selectedTextRange.end)
  3.                                             otherPosition:(isStart ? _selectedTextRange.end : _selectedTextRange.start)];
  4. if (position) {
  5. position = [self _correctedTextPosition:position];

tq/YYKit/Text/YYTextView.m:412: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 412, column 74. Accessing an ivar of an atomic property makes the property nonatomic

  1. magPoint = [self _convertPointToLayout:magPoint];
  2. YYTextPosition *position = [_innerLayout positionForPoint:magPoint
  3.                                               oldPosition:(isStart ? _selectedTextRange.start : _selectedTextRange.end)
  4. otherPosition:(isStart ? _selectedTextRange.end : _selectedTextRange.start)];
  5. if (position) {

tq/YYKit/Text/YYTextView.m:412: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 412, column 101. Accessing an ivar of an atomic property makes the property nonatomic

  1. magPoint = [self _convertPointToLayout:magPoint];
  2. YYTextPosition *position = [_innerLayout positionForPoint:magPoint
  3.                                               oldPosition:(isStart ? _selectedTextRange.start : _selectedTextRange.end)
  4. otherPosition:(isStart ? _selectedTextRange.end : _selectedTextRange.start)];
  5. if (position) {

tq/YYKit/Text/YYTextView.m:413: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 413, column 74. Accessing an ivar of an atomic property makes the property nonatomic

  1. YYTextPosition *position = [_innerLayout positionForPoint:magPoint
  2. oldPosition:(isStart ? _selectedTextRange.start : _selectedTextRange.end)
  3.                                             otherPosition:(isStart ? _selectedTextRange.end : _selectedTextRange.start)];
  4. if (position) {
  5. position = [self _correctedTextPosition:position];

tq/YYKit/Text/YYTextView.m:2835: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2835, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. */
  2. if (_selectedTextRange.asRange.length == 0) {
  3. if (action == @selector(select:) ||
  4. action == @selector(selectAll:)) {

tq/YYKit/Text/YYTextView.m:2851: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2851, column 20. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. if (action == @selector(selectAll:)) {
  3.         return _selectedTextRange.asRange.length < _innerText.length;
  4. }
  5. if (action == @selector(paste:)) {

tq/YYKit/Image/YYImageCache.m:212: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 212, column 14. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. if (type & YYImageCacheTypeDisk) {
  3.     if ([_diskCache containsObjectForKey:key])
  4. return YES;
  5. }

tq/YYKit/Image/YYImageCache.m:208: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 208, column 14. Accessing an ivar of an atomic property makes the property nonatomic

  1. {
  2. if (type & YYImageCacheTypeMemory) {
  3.     if ([_memoryCache containsObjectForKey:key])
  4. return YES;
  5. }

tq/YYKit/Cache/YYCache.m:54: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 54, column 56. Accessing an ivar of an atomic property makes the property nonatomic

    • (BOOL)containsObjectForKey:(NSString *)key {
  1. return [_memoryCache containsObjectForKey:key] || [_diskCache containsObjectForKey:key];
  2. }

tq/YYKit/Cache/YYCache.m:54: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 54, column 13. Accessing an ivar of an atomic property makes the property nonatomic

    • (BOOL)containsObjectForKey:(NSString *)key {
  1. return [_memoryCache containsObjectForKey:key] || [_diskCache containsObjectForKey:key];
  2. }

tq/YYKit/Cache/YYCache.m:65: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 65, column 10. Accessing an ivar of an atomic property makes the property nonatomic

  1. });
  2. } else {
  3.     [_diskCache containsObjectForKey:key withBlock:block];
  4. }
  5. }

tq/YYKit/Cache/YYCache.m:60: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 60, column 10. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (!block) return;
  2. if ([_memoryCache containsObjectForKey:key]) {
  3. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
  4. block(key, YES);

tq/YYKit/Text/Component/YYTextLayout.m:82: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _fixedLineHeight of an atomic property at line 82, column 27. Accessing an ivar of an atomic property makes the property nonatomic

    • (id)copyWithZone:(NSZone *)zone {
  1. YYTextLinePositionSimpleModifier *one = [self.class new];
  2. one.fixedLineHeight = _fixedLineHeight;
  3. return one;
  4. }

tq/YYKit/Text/YYTextView.m:2875: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2875, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)cut:(id)sender {
  1. [self _endTouchTracking];
  2. if (_selectedTextRange.asRange.length == 0) return;
  3. [self _copySelectedTextToPasteboard];

tq/YYKit/Text/YYTextView.m:2880: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2880, column 24. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _saveToUndoStack];
  2. [self _resetRedoStack];
  3. [self replaceRange:_selectedTextRange withText:@""];
  4. }

tq/YYKit/Text/YYTextView.m:3224: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3224, column 79. Accessing an ivar of an atomic property makes the property nonatomic

  1. _state.deleteConfirm = NO;
  2. if (range.length == 0) {
  3.     YYTextRange *extendRange = [_innerLayout textRangeByExtendingPosition:_selectedTextRange.end inDirection:UITextLayoutDirectionLeft offset:1];
  4. if ([self _isTextRangeValid:extendRange]) {
  5. range = extendRange.asRange;

tq/YYKit/Text/YYTextView.m:3201: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3201, column 21. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)deleteBackward {
  1. [self _updateIfNeeded];
  2. NSRange range = _selectedTextRange.asRange;
  3. if (range.location == 0 && range.length == 0) return;
  4. _state.typingAttributesOnce = NO;

tq/YYKit/Text/YYTextView.m:3212: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3212, column 13. Accessing an ivar of an atomic property makes the property nonatomic

  1. _state.deleteConfirm = YES;
  2. [_inputDelegate selectionWillChange:self];
  3.         _selectedTextRange = [YYTextRange rangeWithRange:effectiveRange];
  4. _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  5. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:3213: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3213, column 13. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_inputDelegate selectionWillChange:self];
  2. _selectedTextRange = [YYTextRange rangeWithRange:effectiveRange];
  3.         _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  4. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:3213: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3213, column 60. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_inputDelegate selectionWillChange:self];
  2. _selectedTextRange = [YYTextRange rangeWithRange:effectiveRange];
  3.         _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  4. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:3229: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3229, column 40. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. }
  3. if (!NSEqualRanges(_lastTypeRange, _selectedTextRange.asRange)) {
  4. [self _saveToUndoStack];
  5. [self _resetRedoStack];

tq/YYKit/Cache/YYCache.m:135: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _name of an atomic property at line 135, column 86. Accessing an ivar of an atomic property makes the property nonatomic

    • (NSString *)description {
  1. if (_name) return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _name];
  2. else return [NSString stringWithFormat:@"<%@: %p>", self.class, self];
  3. }

tq/YYKit/Cache/YYCache.m:135: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _name of an atomic property at line 135, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (NSString *)description {
  1. if (_name) return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _name];
  2. else return [NSString stringWithFormat:@"<%@: %p>", self.class, self];
  3. }

tq/YYKit/Cache/YYDiskCache.m:502: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _name of an atomic property at line 502, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (NSString*)description
  1. {
  2. if (_name)
  3. return [NSString stringWithFormat:@"<%@: %p> (%@:%@)", self.class, self, _name, _path];
  4. else

tq/YYKit/Cache/YYDiskCache.m:505: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _path of an atomic property at line 505, column 79. Accessing an ivar of an atomic property makes the property nonatomic

  1. return [NSString stringWithFormat:@"<%@: %p> (%@:%@)", self.class, self, _name, _path];
  2. else
  3.     return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _path];
  4. }

tq/YYKit/Cache/YYDiskCache.m:503: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _path of an atomic property at line 503, column 89. Accessing an ivar of an atomic property makes the property nonatomic

  1. {
  2. if (_name)
  3.     return [NSString stringWithFormat:@"<%@: %p> (%@:%@)", self.class, self, _name, _path];
  4. else
  5. return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _path];

tq/YYKit/Cache/YYDiskCache.m:503: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _name of an atomic property at line 503, column 82. Accessing an ivar of an atomic property makes the property nonatomic

  1. {
  2. if (_name)
  3.     return [NSString stringWithFormat:@"<%@: %p> (%@:%@)", self.class, self, _name, _path];
  4. else
  5. return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _path];

tq/YYKit/Utility/YYKeychain.m:277: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 277, column 5. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. if (self.label) [str appendFormat:@" service:%@,\n", self.label];
  2. if (self.type) [str appendFormat:@" service:%@,\n", self.type];
  3. if (self.creater) [str appendFormat:@"  service:%@,\n", self.creater];
  4. if (self.comment) [str appendFormat:@" service:%@,\n", self.comment];
  5. if (self.descr) [str appendFormat:@" service:%@,\n", self.descr];

tq/YYKit/Utility/YYKeychain.m:276: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 276, column 5. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. if (self.password) [str appendFormat:@" service:%@,\n", self.password];
  2. if (self.label) [str appendFormat:@" service:%@,\n", self.label];
  3. if (self.type) [str appendFormat:@"  service:%@,\n", self.type];
  4. if (self.creater) [str appendFormat:@" service:%@,\n", self.creater];
  5. if (self.comment) [str appendFormat:@" service:%@,\n", self.comment];

tq/YYKit/Cache/YYMemoryCache.m:510: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _name of an atomic property at line 510, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (NSString *)description {
  1. if (_name) return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _name];
  2. else return [NSString stringWithFormat:@"<%@: %p>", self.class, self];
  3. }

tq/YYKit/Cache/YYMemoryCache.m:510: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _name of an atomic property at line 510, column 86. Accessing an ivar of an atomic property makes the property nonatomic

    • (NSString *)description {
  1. if (_name) return [NSString stringWithFormat:@"<%@: %p> (%@)", self.class, self, _name];
  2. else return [NSString stringWithFormat:@"<%@: %p>", self.class, self];
  3. }

tq/YYKit/Utility/YYKeychain.m:222: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 222, column 5. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. if (self.accessible) dic[(__bridge id)kSecAttrAccessible] = YYKeychainAccessibleStr(self.accessible);
  2. if (self.passwordData) dic[(__bridge id)kSecValueData] = self.passwordData;
  3. if (self.type) dic[(__bridge id)kSecAttrType] = self.type;
  4. if (self.creater) dic[(__bridge id)kSecAttrCreator] = self.creater;
  5. if (self.comment) dic[(__bridge id)kSecAttrComment] = self.comment;

tq/YYKit/Utility/YYKeychain.m:223: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 223, column 5. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. if (self.passwordData) dic[(__bridge id)kSecValueData] = self.passwordData;
  2. if (self.type) dic[(__bridge id)kSecAttrType] = self.type;
  3. if (self.creater) dic[(__bridge id)kSecAttrCreator] = self.creater;
  4. if (self.comment) dic[(__bridge id)kSecAttrComment] = self.comment;
  5. if (self.descr) dic[(__bridge id)kSecAttrDescription] = self.descr;

tq/YYKit/Utility/YYAsyncLayer.m:104: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _displaysAsynchronously of an atomic property at line 104, column 25. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)display {
  1. super.contents = super.contents;
  2. [self _displayAsync:_displaysAsynchronously];
  3. }

tq/YYKit/Image/YYImageCache.m:280: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 280, column 17. Accessing an ivar of an atomic property makes the property nonatomic

    • (NSData)getImageDataForKey:(NSString)key
  1. {
  2. return (id)[_diskCache objectForKey:key];
  3. }

tq/YYKit/Image/YYImageCache.m:236: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 236, column 14. Accessing an ivar of an atomic property makes the property nonatomic

  1. UIImage* image = [self imageFromData:data];
  2. if (image && (type & YYImageCacheTypeMemory)) {
  3.         [_memoryCache setObject:image forKey:key withCost:[self imageCost:image]];
  4. }
  5. return image;

tq/YYKit/Image/YYImageCache.m:233: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 233, column 29. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. if (type & YYImageCacheTypeDisk) {
  3.     NSData* data = (id)[_diskCache objectForKey:key];
  4. UIImage* image = [self imageFromData:data];
  5. if (image && (type & YYImageCacheTypeMemory)) {

tq/YYKit/Image/YYImageCache.m:228: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 228, column 27. Accessing an ivar of an atomic property makes the property nonatomic

  1. return nil;
  2. if (type & YYImageCacheTypeMemory) {
  3.     UIImage* image = [_memoryCache objectForKey:key];
  4. if (image)
  5. return image;

tq/YYKit/Image/YYImageCache.m:71: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _allowAnimatedImage of an atomic property at line 71, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. scale = [UIScreen mainScreen].scale;
  2. UIImage* image;
  3. if (_allowAnimatedImage) {
  4. image = [[YYImage alloc] initWithData:data scale:scale];
  5. if (_decodeForDisplay)

tq/YYKit/Image/YYImageCache.m:73: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _decodeForDisplay of an atomic property at line 73, column 13. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_allowAnimatedImage) {
  2. image = [[YYImage alloc] initWithData:data scale:scale];
  3.     if (_decodeForDisplay)
  4. image = [image imageByDecoded];
  5. } else {

tq/YYKit/Image/YYImageCache.m:77: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _decodeForDisplay of an atomic property at line 77, column 58. Accessing an ivar of an atomic property makes the property nonatomic

  1. } else {
  2. YYImageDecoder* decoder = [YYImageDecoder decoderWithData:data scale:scale];
  3.     image = [decoder frameAtIndex:0 decodeForDisplay:_decodeForDisplay].image;
  4. }
  5. return image;

tq/YYKit/Text/YYTextView.m:3192: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3192, column 40. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)insertText:(NSString *)text {
  1. if (text.length == 0) return;
  2. if (!NSEqualRanges(_lastTypeRange, _selectedTextRange.asRange)) {
  3. [self _saveToUndoStack];
  4. [self _resetRedoStack];

tq/YYKit/Text/YYTextView.m:3196: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3196, column 24. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _resetRedoStack];
  2. }
  3. [self replaceRange:_selectedTextRange withText:text];
  4. }

tq/YYKit/Image/YYWebImageOperation.m:766: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _cancelled of an atomic property at line 766, column 22. Accessing an ivar of an atomic property makes the property nonatomic

    • (BOOL)isCancelled {
  1. [_lock lock];
  2. BOOL cancelled = _cancelled;
  3. [_lock unlock];
  4. return cancelled;

tq/YYKit/Image/YYWebImageOperation.m:732: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _executing of an atomic property at line 732, column 22. Accessing an ivar of an atomic property makes the property nonatomic

    • (BOOL)isExecuting {
  1. [_lock lock];
  2. BOOL executing = _executing;
  3. [_lock unlock];
  4. return executing;

tq/YYKit/Image/YYWebImageOperation.m:749: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _finished of an atomic property at line 749, column 21. Accessing an ivar of an atomic property makes the property nonatomic

    • (BOOL)isFinished {
  1. [_lock lock];
  2. BOOL finished = _finished;
  3. [_lock unlock];
  4. return finished;

tq/YYKit/Model/NSObject+YYModel.m:1645: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 1645, column 13. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. if (propertyMeta->_isCNumber) {
  2. NSNumber *value = ModelCreateNumberFromProperty(self, propertyMeta);
  3.         if (value) [aCoder encodeObject:value forKey:propertyMeta->_name];
  4. } else {
  5. switch (propertyMeta->_type & YYEncodingTypeMask) {

tq/YYKit/Text/Component/YYTextLayout.m:67: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _fixedLineHeight of an atomic property at line 67, column 99. Accessing an ivar of an atomic property makes the property nonatomic

  1. YYTextLine *line = lines[i];
  2. CGPoint pos = line.position;
  3.         pos.x = container.size.width - container.insets.right - line.row * _fixedLineHeight - _fixedLineHeight * 0.9;
  4. line.position = pos;
  5. }

tq/YYKit/Text/Component/YYTextLayout.m:74: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _fixedLineHeight of an atomic property at line 74, column 32. Accessing an ivar of an atomic property makes the property nonatomic

  1. YYTextLine *line = lines[i];
  2. CGPoint pos = line.position;
  3.         pos.y = line.row * _fixedLineHeight + _fixedLineHeight * 0.9 + container.insets.top;
  4. line.position = pos;
  5. }

tq/YYKit/Text/Component/YYTextLayout.m:74: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _fixedLineHeight of an atomic property at line 74, column 51. Accessing an ivar of an atomic property makes the property nonatomic

  1. YYTextLine *line = lines[i];
  2. CGPoint pos = line.position;
  3.         pos.y = line.row * _fixedLineHeight + _fixedLineHeight * 0.9 + container.insets.top;
  4. line.position = pos;
  5. }

tq/YYKit/Text/Component/YYTextLayout.m:67: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _fixedLineHeight of an atomic property at line 67, column 80. Accessing an ivar of an atomic property makes the property nonatomic

  1. YYTextLine *line = lines[i];
  2. CGPoint pos = line.position;
  3.         pos.x = container.size.width - container.insets.right - line.row * _fixedLineHeight - _fixedLineHeight * 0.9;
  4. line.position = pos;
  5. }

tq/YYKit/Cache/YYCache.m:72: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 72, column 19. Accessing an ivar of an atomic property makes the property nonatomic

  1. id object = [_memoryCache objectForKey:key];
  2. if (!object) {
  3.     object = [_diskCache objectForKey:key];
  4. if (object) {
  5. [_memoryCache setObject:object forKey:key];

tq/YYKit/Cache/YYCache.m:70: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 70, column 28. Accessing an ivar of an atomic property makes the property nonatomic

    • (id)objectForKey:(NSString *)key {
  1. id<NSCoding> object = [_memoryCache objectForKey:key];
  2. if (!object) {
  3. object = [_diskCache objectForKey:key];

tq/YYKit/Cache/YYCache.m:74: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 74, column 14. Accessing an ivar of an atomic property makes the property nonatomic

  1. object = [_diskCache objectForKey:key];
  2. if (object) {
  3.         [_memoryCache setObject:object forKey:key];
  4. }
  5. }

tq/YYKit/Cache/YYDiskCache.m:263: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _customUnarchiveBlock of an atomic property at line 263, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. id object = nil;
  2. if (_customUnarchiveBlock) {
  3. object = _customUnarchiveBlock(item.value);
  4. } else {

tq/YYKit/Cache/YYDiskCache.m:264: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _customUnarchiveBlock of an atomic property at line 264, column 18. Accessing an ivar of an atomic property makes the property nonatomic

  1. id object = nil;
  2. if (_customUnarchiveBlock) {
  3.     object = _customUnarchiveBlock(item.value);
  4. } else {
  5. @try {

tq/YYKit/Cache/YYCache.m:88: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 88, column 10. Accessing an ivar of an atomic property makes the property nonatomic

  1. });
  2. } else {
  3.     [_diskCache objectForKey:key withBlock:^(NSString *key, id<NSCoding> object) {
  4. if (object && ![_memoryCache objectForKey:key]) {
  5. [_memoryCache setObject:object forKey:key];

tq/YYKit/Cache/YYCache.m:82: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 82, column 28. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)objectForKey:(NSString )key withBlock:(void (^)(NSString key, id object))block {
  1. if (!block) return;
  2. id<NSCoding> object = [_memoryCache objectForKey:key];
  3. if (object) {
  4. dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

tq/YYKit/Text/YYTextView.m:2943: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2943, column 34. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (atr) {
  2.     NSUInteger endPosition = _selectedTextRange.start.offset + atr.length;
  3. NSMutableAttributedString *text = _innerText.mutableCopy;
  4. [text replaceCharactersInRange:_selectedTextRange.asRange withAttributedString:atr];

tq/YYKit/Text/YYTextView.m:2945: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2945, column 40. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSUInteger endPosition = _selectedTextRange.start.offset + atr.length;
  2. NSMutableAttributedString *text = _innerText.mutableCopy;
  3.     [text replaceCharactersInRange:_selectedTextRange.asRange withAttributedString:atr];
  4. self.attributedText = text;
  5. YYTextPosition *pos = [self _correctedTextPosition:[YYTextPosition positionWithOffset:endPosition]];

tq/YYKit/Text/YYTextView.m:2958: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2958, column 32. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _saveToUndoStack];
  2. [self _resetRedoStack];
  3.         [self replaceRange:_selectedTextRange withText:string];
  4. }
  5. }

tq/YYKit/Cache/YYCache.m:119: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 119, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeAllObjects {
  1. [_memoryCache removeAllObjects];
  2. [_diskCache removeAllObjects];
  3. }

tq/YYKit/Cache/YYCache.m:118: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 118, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeAllObjects {
  1. [_memoryCache removeAllObjects];
  2. [_diskCache removeAllObjects];
  3. }

tq/YYKit/Cache/YYCache.m:123: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 123, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeAllObjectsWithBlock:(void(^)(void))block {
  1. [_memoryCache removeAllObjects];
  2. [_diskCache removeAllObjectsWithBlock:block];
  3. }

tq/YYKit/Cache/YYCache.m:124: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 124, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeAllObjectsWithBlock:(void(^)(void))block {
  1. [_memoryCache removeAllObjects];
  2. [_diskCache removeAllObjectsWithBlock:block];
  3. }

tq/YYKit/Cache/YYCache.m:130: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 130, column 6. Accessing an ivar of an atomic property makes the property nonatomic

  1. endBlock:(void(^)(BOOL error))end {
  2. [_memoryCache removeAllObjects];
  3. [_diskCache removeAllObjectsWithProgressBlock:progress endBlock:end];
  4. }

tq/YYKit/Cache/YYCache.m:129: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 129, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeAllObjectsWithProgressBlock:(void(^)(int removedCount, int totalCount))progress
  1. endBlock:(void(^)(BOOL error))end {
  2. [_memoryCache removeAllObjects];
  3. [_diskCache removeAllObjectsWithProgressBlock:progress endBlock:end];

tq/YYKit/Image/YYImageCache.m:195: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 195, column 10. Accessing an ivar of an atomic property makes the property nonatomic

  1. {
  2. if (type & YYImageCacheTypeMemory)
  3.     [_memoryCache removeObjectForKey:key];
  4. if (type & YYImageCacheTypeDisk)
  5. [_diskCache removeObjectForKey:key];

tq/YYKit/Image/YYImageCache.m:197: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 197, column 10. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_memoryCache removeObjectForKey:key];
  2. if (type & YYImageCacheTypeDisk)
  3.     [_diskCache removeObjectForKey:key];
  4. }

tq/YYKit/Cache/YYCache.m:108: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 108, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeObjectForKey:(NSString *)key {
  1. [_memoryCache removeObjectForKey:key];
  2. [_diskCache removeObjectForKey:key];
  3. }

tq/YYKit/Cache/YYCache.m:109: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 109, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeObjectForKey:(NSString *)key {
  1. [_memoryCache removeObjectForKey:key];
  2. [_diskCache removeObjectForKey:key];
  3. }

tq/YYKit/Cache/YYCache.m:114: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 114, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeObjectForKey:(NSString )key withBlock:(void (^)(NSString key))block {
  1. [_memoryCache removeObjectForKey:key];
  2. [_diskCache removeObjectForKey:key withBlock:block];
  3. }

tq/YYKit/Cache/YYCache.m:113: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 113, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)removeObjectForKey:(NSString )key withBlock:(void (^)(NSString key))block {
  1. [_memoryCache removeObjectForKey:key];
  2. [_diskCache removeObjectForKey:key withBlock:block];
  3. }

tq/YYKit/Text/YYTextView.m:3408: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3408, column 37. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (self.isFirstResponder) {
  2.     [self _scrollRangeToVisible:_selectedTextRange];
  3. }

tq/YYKit/Text/YYTextView.m:3416: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3416, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
  2. _lastTypeRange = _selectedTextRange.asRange;
  3. }

tq/YYKit/Text/YYTextView.m:2970: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2970, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (newRange.asRange.length > 0) {
  2. [_inputDelegate selectionWillChange:self];
  3.     _selectedTextRange = newRange;
  4. [_inputDelegate selectionDidChange:self];
  5. }

tq/YYKit/Text/YYTextView.m:2967: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2967, column 67. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_selectedTextRange.asRange.length > 0 || _innerText.length == 0) return;
  2. YYTextRange *newRange = [self _getClosestTokenRangeAtPosition:_selectedTextRange.start];
  3. if (newRange.asRange.length > 0) {
  4. [_inputDelegate selectionWillChange:self];

tq/YYKit/Text/YYTextView.m:2966: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2966, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _endTouchTracking];
  2. if (_selectedTextRange.asRange.length > 0 || _innerText.length == 0) return;
  3. YYTextRange *newRange = [self _getClosestTokenRangeAtPosition:_selectedTextRange.start];
  4. if (newRange.asRange.length > 0) {

tq/YYKit/Text/YYTextView.m:2984: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2984, column 5. Accessing an ivar of an atomic property makes the property nonatomic

  1. _trackingRange = nil;
  2. [_inputDelegate selectionWillChange:self];
  3. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(0, _innerText.length)];
  4. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:3611: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3611, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (UITextStorageDirection)selectionAffinity {
  1. if (_selectedTextRange.end.affinity == YYTextAffinityForward) {
  2. return UITextStorageDirectionForward;
  3. } else {

tq/YYKit/Text/YYTextView.m:2149: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2149, column 5. Accessing an ivar of an atomic property makes the property nonatomic

  1. _innerText = text;
  2. [self _parseText];
  3. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(0, _innerText.length)];
  4. [_inputDelegate textDidChange:self];
  5. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:2163: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2163, column 37. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (self.isFirstResponder) {
  2.     [self _scrollRangeToVisible:_selectedTextRange];
  3. }

tq/YYKit/Image/YYWebImageOperation.m:756: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _cancelled of an atomic property at line 756, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setCancelled:(BOOL)cancelled {
  1. [_lock lock];
  2. if (_cancelled != cancelled) {
  3. [self willChangeValueForKey:@"isCancelled"];
  4. _cancelled = cancelled;

tq/YYKit/Image/YYWebImageOperation.m:758: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _cancelled of an atomic property at line 758, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_cancelled != cancelled) {
  2. [self willChangeValueForKey:@"isCancelled"];
  3.     _cancelled = cancelled;
  4. [self didChangeValueForKey:@"isCancelled"];
  5. }

tq/YYKit/Image/YYWebImageOperation.m:724: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _executing of an atomic property at line 724, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_executing != executing) {
  2. [self willChangeValueForKey:@"isExecuting"];
  3.     _executing = executing;
  4. [self didChangeValueForKey:@"isExecuting"];
  5. }

tq/YYKit/Image/YYWebImageOperation.m:722: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _executing of an atomic property at line 722, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setExecuting:(BOOL)executing {
  1. [_lock lock];
  2. if (_executing != executing) {
  3. [self willChangeValueForKey:@"isExecuting"];
  4. _executing = executing;

tq/YYKit/Image/YYWebImageOperation.m:739: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _finished of an atomic property at line 739, column 9. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setFinished:(BOOL)finished {
  1. [_lock lock];
  2. if (_finished != finished) {
  3. [self willChangeValueForKey:@"isFinished"];
  4. _finished = finished;

tq/YYKit/Image/YYWebImageOperation.m:741: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _finished of an atomic property at line 741, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_finished != finished) {
  2. [self willChangeValueForKey:@"isFinished"];
  3.     _finished = finished;
  4. [self didChangeValueForKey:@"isFinished"];
  5. }

tq/YYKit/Image/YYImageCache.m:149: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 149, column 18. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (image) {
  2. if (image.isDecodedForDisplay) {
  3.             [_memoryCache setObject:image forKey:key withCost:[_self imageCost:image]];
  4. } else {
  5. dispatch_async(YYImageCacheDecodeQueue(), ^{

tq/YYKit/Image/YYImageCache.m:173: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 173, column 14. Accessing an ivar of an atomic property makes the property nonatomic

  1. [YYDiskCache setExtendedData:[NSKeyedArchiver archivedDataWithRootObject:@(image.scale)] toObject:imageData];
  2. }
  3.         [_diskCache setObject:imageData forKey:key];
  4. } else if (image) {
  5. dispatch_async(YYImageCacheIOQueue(), ^{

tq/YYKit/Text/YYTextView.m:3298: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3298, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. if (_selectedTextRange.asRange.length > 0) {
  3. [self replaceRange:_selectedTextRange withText:@""];
  4. }

tq/YYKit/Text/YYTextView.m:3317: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3317, column 5. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  3. _markedTextRange = [self _correctedTextRange:_markedTextRange];
  4. if (_markedTextRange.asRange.length == 0) {

tq/YYKit/Text/YYTextView.m:3341: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3341, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. [[NSNotificationCenter defaultCenter] postNotificationName:YYTextViewTextDidChangeNotification object:self];
  2. _lastTypeRange = _selectedTextRange.asRange;
  3. }

tq/YYKit/Text/YYTextView.m:3308: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3308, column 58. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_markedTextRange == nil) {
  2. _markedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.end.offset, markedText.length)];
  3.     [_innerText replaceCharactersInRange:NSMakeRange(_selectedTextRange.end.offset, 0) withString:markedText];
  4. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.start.offset + selectedRange.location, selectedRange.length)];
  5. } else {

tq/YYKit/Text/YYTextView.m:3309: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3309, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. _markedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.end.offset, markedText.length)];
  2. [_innerText replaceCharactersInRange:NSMakeRange(_selectedTextRange.end.offset, 0) withString:markedText];
  3.     _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.start.offset + selectedRange.location, selectedRange.length)];
  4. } else {
  5. _markedTextRange = [self _correctedTextRange:_markedTextRange];

tq/YYKit/Text/YYTextView.m:3317: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3317, column 52. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. _selectedTextRange = [self _correctedTextRange:_selectedTextRange];
  3. _markedTextRange = [self _correctedTextRange:_markedTextRange];
  4. if (_markedTextRange.asRange.length == 0) {

tq/YYKit/Text/YYTextView.m:3286: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3286, column 40. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (!NSEqualRanges(_lastTypeRange, _selectedTextRange.asRange)) {
  2. [self _saveToUndoStack];
  3. [self _resetRedoStack];

tq/YYKit/Text/YYTextView.m:3314: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3314, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_innerText replaceCharactersInRange:_markedTextRange.asRange withString:markedText];
  2. _markedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_markedTextRange.start.offset, markedText.length)];
  3.     _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_markedTextRange.start.offset + selectedRange.location, selectedRange.length)];
  4. }

tq/YYKit/Text/YYTextView.m:3299: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3299, column 28. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_selectedTextRange.asRange.length > 0) {
  2.     [self replaceRange:_selectedTextRange withText:@""];
  3. }

tq/YYKit/Text/YYTextView.m:3280: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3280, column 83. Accessing an ivar of an atomic property makes the property nonatomic

  1. if ([self.delegate respondsToSelector:@selector(textView:shouldChangeTextInRange:replacementText:)]) {
  2.     NSRange range = _markedTextRange ? _markedTextRange.asRange : NSMakeRange(_selectedTextRange.end.offset, 0);
  3. BOOL should = [self.delegate textView:self shouldChangeTextInRange:range replacementText:markedText];
  4. if (!should) return;

tq/YYKit/Text/YYTextView.m:3307: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3307, column 68. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (!markedText) markedText = @"";
  2. if (_markedTextRange == nil) {
  3.     _markedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.end.offset, markedText.length)];
  4. [_innerText replaceCharactersInRange:NSMakeRange(_selectedTextRange.end.offset, 0) withString:markedText];
  5. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.start.offset + selectedRange.location, selectedRange.length)];

tq/YYKit/Text/YYTextView.m:3334: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3334, column 33. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _updateLayout];
  2. [self _updateSelectionView];
  3. [self _scrollRangeToVisible:_selectedTextRange];
  4. if ([self.delegate respondsToSelector:@selector(textViewDidChange:)]) {

tq/YYKit/Text/YYTextView.m:3309: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3309, column 70. Accessing an ivar of an atomic property makes the property nonatomic

  1. _markedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.end.offset, markedText.length)];
  2. [_innerText replaceCharactersInRange:NSMakeRange(_selectedTextRange.end.offset, 0) withString:markedText];
  3.     _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(_selectedTextRange.start.offset + selectedRange.location, selectedRange.length)];
  4. } else {
  5. _markedTextRange = [self _correctedTextRange:_markedTextRange];

tq/YYKit/Cache/YYCache.m:98: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 98, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setObject:(id)object forKey:(NSString *)key {
  1. [_memoryCache setObject:object forKey:key];
  2. [_diskCache setObject:object forKey:key];
  3. }

tq/YYKit/Cache/YYCache.m:99: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 99, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setObject:(id)object forKey:(NSString *)key {
  1. [_memoryCache setObject:object forKey:key];
  2. [_diskCache setObject:object forKey:key];
  3. }

tq/YYKit/Cache/YYDiskCache.m:316: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _inlineThreshold of an atomic property at line 316, column 28. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSString* LFN_file_name = nil;
  2. if (_kv.type != YYKVStorageTypeSQLite) {
  3.     if (value.length > _inlineThreshold) {
  4. LFN_file_name = [self _filenameForKey:key];
  5. }

tq/YYKit/Cache/YYDiskCache.m:302: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _customArchiveBlock of an atomic property at line 302, column 9. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSData* extendedData = [YYDiskCache getExtendedDataFromObject:object];
  2. NSData* value = nil;
  3. if (_customArchiveBlock) {
  4. value = _customArchiveBlock(object);
  5. } else {

tq/YYKit/Cache/YYDiskCache.m:303: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _customArchiveBlock of an atomic property at line 303, column 17. Accessing an ivar of an atomic property makes the property nonatomic

  1. NSData* value = nil;
  2. if (_customArchiveBlock) {
  3.     value = _customArchiveBlock(object);
  4. } else {
  5. @try {

tq/YYKit/Cache/YYCache.m:104: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _diskCache of an atomic property at line 104, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setObject:(id)object forKey:(NSString *)key withBlock:(void (^)(void))block {
  1. [_memoryCache setObject:object forKey:key];
  2. [_diskCache setObject:object forKey:key withBlock:block];
  3. }

tq/YYKit/Cache/YYCache.m:103: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _memoryCache of an atomic property at line 103, column 6. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setObject:(id)object forKey:(NSString *)key withBlock:(void (^)(void))block {
  1. [_memoryCache setObject:object forKey:key];
  2. [_diskCache setObject:object forKey:key withBlock:block];
  3. }

tq/YYKit/Cache/YYMemoryCache.m:451: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _countLimit of an atomic property at line 451, column 29. Accessing an ivar of an atomic property makes the property nonatomic

  1. });
  2. }
  3. if (_lru->_totalCount > _countLimit) {
  4. _YYLinkedMapNode *node = [_lru removeTailNode];
  5. if (_lru->_releaseAsynchronously) {

tq/YYKit/Cache/YYMemoryCache.m:446: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _costLimit of an atomic property at line 446, column 28. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_lru insertNodeAtHead:node];
  2. }
  3. if (_lru->_totalCost > _costLimit) {
  4. dispatch_async(_queue, ^{
  5. [self trimToCost:_costLimit];

tq/YYKit/Text/YYTextView.m:2252: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2252, column 5. Accessing an ivar of an atomic property makes the property nonatomic

  1. range = [self _correctedTextRange:range];
  2. [self _endTouchTracking];
  3. _selectedTextRange = range;
  4. [self _updateSelectionView];

tq/YYKit/Text/YYTextView.m:3254: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3254, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_inputDelegate selectionWillChange:self];
  2. _selectedTextRange = selectedTextRange;
  3. _lastTypeRange = _selectedTextRange.asRange;
  4. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:3253: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3253, column 5. Accessing an ivar of an atomic property makes the property nonatomic

  1. [_inputDelegate selectionWillChange:self];
  2. _selectedTextRange = selectedTextRange;
  3. _lastTypeRange = _selectedTextRange.asRange;
  4. [_inputDelegate selectionDidChange:self];

tq/YYKit/Text/YYTextView.m:3245: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3245, column 36. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (!selectedTextRange) return;
  2. selectedTextRange = [self _correctedTextRange:selectedTextRange];
  3. if ([selectedTextRange isEqual:_selectedTextRange]) return;
  4. [self _updateIfNeeded];
  5. [self _endTouchTracking];

tq/YYKit/Text/YYTextView.m:3261: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3261, column 37. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (self.isFirstResponder) {
  2.     [self _scrollRangeToVisible:_selectedTextRange];
  3. }
  4. }

tq/YYKit/Text/YYTextView.m:3619: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3619, column 54. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setSelectionAffinity:(UITextStorageDirection)selectionAffinity {
  1. _selectedTextRange = [YYTextRange rangeWithRange:_selectedTextRange.asRange affinity:selectionAffinity == UITextStorageDirectionForward ? YYTextAffinityForward : YYTextAffinityBackward];
  2. [self _updateSelectionView];
  3. }

tq/YYKit/Text/YYTextView.m:3619: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3619, column 5. Accessing an ivar of an atomic property makes the property nonatomic

    • (void)setSelectionAffinity:(UITextStorageDirection)selectionAffinity {
  1. _selectedTextRange = [YYTextRange rangeWithRange:_selectedTextRange.asRange affinity:selectionAffinity == UITextStorageDirectionForward ? YYTextAffinityForward : YYTextAffinityBackward];
  2. [self _updateSelectionView];
  3. }

tq/YYKit/Text/YYTextView.m:2487: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2487, column 22. Accessing an ivar of an atomic property makes the property nonatomic

  1. _touchBeganTime = _trackingTime = touch.timestamp;
  2. _touchBeganPoint = _trackingPoint = point;
  3. _trackingRange = _selectedTextRange;
  4. _state.trackingGrabber = NO;

tq/YYKit/Text/YYTextView.m:2517: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2517, column 21. Accessing an ivar of an atomic property makes the property nonatomic

  1. _magnifierRangedOffset = [self _getMagnifierRangedOffset];
  2. } else {
  3.             if (_selectedTextRange.asRange.length == 0 && self.isFirstResponder) {
  4. if ([_selectionView isCaretContainsPoint:point]) { // track caret
  5. _state.trackingCaret = YES;

tq/YYKit/Text/YYTextView.m:2698: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2698, column 42. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_trackingRange && (![_trackingRange isEqual:_selectedTextRange] || _state.trackingPreSelect)) {
  2.         if (![_trackingRange isEqual:_selectedTextRange]) {
  3. [_inputDelegate selectionWillChange:self];
  4. _selectedTextRange = _trackingRange;

tq/YYKit/Text/YYTextView.m:2685: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2685, column 33. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (_state.clearsOnInsertionOnce) {
  2. _state.clearsOnInsertionOnce = NO;
  3.                             _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(0, _innerText.length)];
  4. [self _setSelectedRange:_selectedTextRange.asRange];
  5. } else {

tq/YYKit/Text/YYTextView.m:2697: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2697, column 57. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2.     if (_trackingRange && (![_trackingRange isEqual:_selectedTextRange] || _state.trackingPreSelect)) {
  3. if (![_trackingRange isEqual:_selectedTextRange]) {
  4. [_inputDelegate selectionWillChange:self];

tq/YYKit/Text/YYTextView.m:2706: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2706, column 45. Accessing an ivar of an atomic property makes the property nonatomic

  1. }
  2. if (!_state.trackingGrabber && !_state.trackingPreSelect) {
  3.             [self _scrollRangeToVisible:_selectedTextRange];
  4. }
  5. }

tq/YYKit/Text/YYTextView.m:2700: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2700, column 17. Accessing an ivar of an atomic property makes the property nonatomic

  1. if (![_trackingRange isEqual:_selectedTextRange]) {
  2. [_inputDelegate selectionWillChange:self];
  3.             _selectedTextRange = _trackingRange;
  4. [_inputDelegate selectionDidChange:self];
  5. [self _updateAttributesHolder];

tq/YYKit/Text/YYTextView.m:2686: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2686, column 57. Accessing an ivar of an atomic property makes the property nonatomic

  1. _state.clearsOnInsertionOnce = NO;
  2. _selectedTextRange = [YYTextRange rangeWithRange:NSMakeRange(0, _innerText.length)];
  3.                             [self _setSelectedRange:_selectedTextRange.asRange];
  4. } else {
  5. [self _updateTextRangeByTrackingCaret];

tq/YYKit/Text/YYTextView.m:2559: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 2559, column 30. Accessing an ivar of an atomic property makes the property nonatomic

  1. } else {
  2.         _trackingRange = _selectedTextRange;
  3. if (_state.trackingGrabber) {
  4. self.panGestureRecognizer.enabled = NO;

tq/YYKit/Text/YYTextView.m:3353: warning: DIRECT_ATOMIC_PROPERTY_ACCESS Direct access to ivar _selectedTextRange of an atomic property at line 3353, column 33. Accessing an ivar of an atomic property makes the property nonatomic

  1. [self _updateOuterProperties];
  2. [self _updateSelectionView];
  3. [self _scrollRangeToVisible:_selectedTextRange];
  4. }

tq/YYKit/Utility/YYReachability.m:136: warning: BAD_POINTER_COMPARISON Implicitly checking whether NSNumber pointer is nil at line 136, column 5. Did you mean to compare against the unboxed value instead? Please either explicitly compare the NSNumber instance to nil, or use one of the NSNumber accessors before the comparison.

  1. });
  2. NSNumber *num = dic[status];
  3. if (num) return num.unsignedIntegerValue;
  4. else return YYReachabilityWWANStatusNone;
  5. }

Summary of the reports

DIRECT_ATOMIC_PROPERTY_ACCESS: 180 NULL_DEREFERENCE: 35 BAD_POINTER_COMPARISON: 13 MEMORY_LEAK: 10 PARAMETER_NOT_NULL_CHECKED: 9 ASSIGN_POINTER_WARNING: 5 IVAR_NOT_NULL_CHECKED: 1