Bläddra i källkod

Fixed warnings: comparisons between unsigned and signed integers.

Javier Soto 12 år sedan
förälder
incheckning
d9da4eb35f

+ 1 - 1
Classes/Global State Explorers/FLEXClassesTableViewController.m

@@ -54,7 +54,7 @@
     const char **classNames = objc_copyClassNamesForImage([self.binaryImageName UTF8String], &classNamesCount);
     if (classNames) {
         NSMutableArray *classNameStrings = [NSMutableArray array];
-        for (int i = 0; i < classNamesCount; i++) {
+        for (unsigned int i = 0; i < classNamesCount; i++) {
             const char *className = classNames[i];
             NSString *classNameString = [NSString stringWithUTF8String:className];
             [classNameStrings addObject:classNameString];

+ 1 - 1
Classes/Global State Explorers/FLEXInstancesTableViewController.m

@@ -102,7 +102,7 @@
     
     id instance = [self.instances objectAtIndex:indexPath.row];
     NSString *title = nil;
-    if ([self.fieldNames count] > indexPath.row) {
+    if ((NSInteger)[self.fieldNames count] > indexPath.row) {
         title = [NSString stringWithFormat:@"%@ %@", NSStringFromClass(object_getClass(instance)), [self.fieldNames objectAtIndex:indexPath.row]];
     } else {
         title = [NSString stringWithFormat:@"%@ %p", NSStringFromClass(object_getClass(instance)), instance];

+ 1 - 1
Classes/Global State Explorers/FLEXLibrariesTableViewController.m

@@ -52,7 +52,7 @@
     if (imageNames) {
         NSMutableArray *imageNameStrings = [NSMutableArray array];
         NSString *appImageName = [FLEXUtility applicationImageName];
-        for (int i = 0; i < imageNamesCount; i++) {
+        for (unsigned int i = 0; i < imageNamesCount; i++) {
             const char *imageName = imageNames[i];
             NSString *imageNameString = [NSString stringWithUTF8String:imageName];
             // Skip the app's image. We're just showing system libraries and frameworks.

+ 3 - 3
Classes/Object Explorers/FLEXObjectExplorerViewController.m

@@ -216,7 +216,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
     unsigned int propertyCount = 0;
     objc_property_t *propertyList = class_copyPropertyList(class, &propertyCount);
     if (propertyList) {
-        for (int i = 0; i < propertyCount; i++) {
+        for (unsigned int i = 0; i < propertyCount; i++) {
             FLEXPropertyBox *propertyBox = [[FLEXPropertyBox alloc] init];
             propertyBox.property = propertyList[i];
             [boxedProperties addObject:propertyBox];
@@ -295,7 +295,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
     unsigned int ivarCount = 0;
     Ivar *ivarList = class_copyIvarList(class, &ivarCount);
     if (ivarList) {
-        for (int i = 0; i < ivarCount; i++) {
+        for (unsigned int i = 0; i < ivarCount; i++) {
             FLEXIvarBox *ivarBox = [[FLEXIvarBox alloc] init];
             ivarBox.ivar = ivarList[i];
             [boxedIvars addObject:ivarBox];
@@ -392,7 +392,7 @@ static const NSInteger kFLEXObjectExplorerScopeIncludeInheritanceIndex = 1;
     unsigned int methodCount = 0;
     Method *methodList = class_copyMethodList(class, &methodCount);
     if (methodList) {
-        for (int i = 0; i < methodCount; i++) {
+        for (unsigned int i = 0; i < methodCount; i++) {
             FLEXMethodBox *methodBox = [[FLEXMethodBox alloc] init];
             methodBox.method = methodList[i];
             [boxedMethods addObject:methodBox];