Przeglądaj źródła

修复部分警告错误

Ray Zhang 6 lat temu
rodzic
commit
f61140e1f2

+ 1 - 1
RedAnt ERP Mobile/common/RAUtils.m

@@ -425,7 +425,7 @@
     if(error==nil)
         return nil;
     NSMutableDictionary* ret = [[NSMutableDictionary alloc] init];
-    [ret setValue:[NSString stringWithFormat:@"%ld",error.code] forKey:@"error_code"];
+    [ret setValue:[NSString stringWithFormat:@"%ld",(long)error.code] forKey:@"error_code"];
     [ret setValue:error.domain forKey:@"err_domain"];
     [ret setValue:[error localizedDescription] forKey:@"err_message"];
     // [ret setObject:error.userInfo forKey:@"user_info"];

+ 1 - 1
common/InfinitePhoto/Controller/RAPhotoPreviewController.m

@@ -258,7 +258,7 @@
     if (self.photoCount == 1) {
         index = 1;
     }
-    NSString *offset = [NSString stringWithFormat:@"%lu / %lu",index,(unsigned long)self.photoCount];
+    NSString *offset = [NSString stringWithFormat:@"%lu / %lu",(long)index,(unsigned long)self.photoCount];
     self.indicator.text = offset;
 }
 

+ 3 - 0
common/UIImage/UIImage+RedAnt.m

@@ -158,6 +158,7 @@ static dispatch_semaphore_t _lock;
             transform = CGAffineTransformTranslate(transform, 0, self.size.height);
             transform = CGAffineTransformRotate(transform, -M_PI_2);
             break;
+        default: break;
     }
     
     switch (self.imageOrientation) {
@@ -172,6 +173,8 @@ static dispatch_semaphore_t _lock;
             transform = CGAffineTransformTranslate(transform, self.size.height, 0);
             transform = CGAffineTransformScale(transform, -1, 1);
             break;
+            
+            default: break;
     }
     
     // Now we draw the underlying CGImage into a new context, applying the transform

+ 1 - 1
common/UIScrollVIew+Empty/UIScrollView+Empty.m

@@ -12,7 +12,7 @@
 
 static const char *emptyKey = "emptyKey";
 
-static const float duration = 0.25;
+//static const float duration = 0.25;
 
 @implementation UIScrollView (Empty)
 //- (void)setEmptyDataViewManualsize:(bool)bManualsize