Fix several small type comparison issues

This commit is contained in:
Lukas Spieß 2015-09-12 00:52:53 +02:00
parent 2999f621d2
commit a006862a61
6 changed files with 7 additions and 7 deletions

View File

@ -61,7 +61,7 @@ FOUNDATION_EXPORT char *BITSafeJsonEventsString;
/** /**
* Number of queue items which will trigger a flush (testing). * Number of queue items which will trigger a flush (testing).
*/ */
@property (nonatomic) NSInteger maxBatchCount; @property (nonatomic) NSUInteger maxBatchCount;
/** /**
* A queue which makes array operations thread safe. * A queue which makes array operations thread safe.

View File

@ -182,7 +182,7 @@ void bit_resetSafeJsonStream(char **string) {
#pragma mark - Batching #pragma mark - Batching
- (NSInteger)maxBatchCount { - (NSUInteger)maxBatchCount {
if(_maxBatchCount <= 0){ if(_maxBatchCount <= 0){
return defaultMaxBatchCount; return defaultMaxBatchCount;
} }

View File

@ -581,7 +581,7 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
#endif #endif
[text appendFormat: fmt, [text appendFormat: fmt,
imageInfo.imageBaseAddress, imageInfo.imageBaseAddress,
imageInfo.imageBaseAddress + (MAX(1, imageInfo.imageSize) - 1), // The Apple format uses an inclusive range imageInfo.imageBaseAddress + (MAX(1U, imageInfo.imageSize) - 1), // The Apple format uses an inclusive range
binaryDesignator, binaryDesignator,
[imageInfo.imageName lastPathComponent], [imageInfo.imageName lastPathComponent],
archName, archName,
@ -809,7 +809,7 @@ static const char *findSEL (const char *imageName, NSString *imageUUID, uint64_t
/* Make sure UTF8/16 characters are handled correctly */ /* Make sure UTF8/16 characters are handled correctly */
NSInteger offset = 0; NSInteger offset = 0;
NSInteger index = 0; NSUInteger index = 0;
for (index = 0; index < [imageName length]; index++) { for (index = 0; index < [imageName length]; index++) {
NSRange range = [imageName rangeOfComposedCharacterSequenceAtIndex:index]; NSRange range = [imageName rangeOfComposedCharacterSequenceAtIndex:index];
if (range.length > 1) { if (range.length > 1) {

View File

@ -359,7 +359,7 @@
- (void)imageButtonPressed:(id)sender { - (void)imageButtonPressed:(id)sender {
if ([self.delegate respondsToSelector:@selector(listCell:didSelectAttachment:)]) { if ([self.delegate respondsToSelector:@selector(listCell:didSelectAttachment:)]) {
NSInteger index = [self.attachmentViews indexOfObject:sender]; NSUInteger index = [self.attachmentViews indexOfObject:sender];
if (index != NSNotFound && [self.message previewableAttachments].count > index) { if (index != NSNotFound && [self.message previewableAttachments].count > index) {
BITFeedbackMessageAttachment *attachment = [self.message previewableAttachments][index]; BITFeedbackMessageAttachment *attachment = [self.message previewableAttachments][index];
[self.delegate listCell:self didSelectAttachment:attachment]; [self.delegate listCell:self didSelectAttachment:attachment];

View File

@ -956,7 +956,7 @@
self.cachedPreviewItems = nil; self.cachedPreviewItems = nil;
NSMutableArray *collectedAttachments = [NSMutableArray new]; NSMutableArray *collectedAttachments = [NSMutableArray new];
for (int i = 0; i < self.manager.numberOfMessages; i++) { for (uint i = 0; i < self.manager.numberOfMessages; i++) {
BITFeedbackMessage *message = [self.manager messageAtIndex:i]; BITFeedbackMessage *message = [self.manager messageAtIndex:i];
[collectedAttachments addObjectsFromArray:message.previewableAttachments]; [collectedAttachments addObjectsFromArray:message.previewableAttachments];
} }

View File

@ -301,7 +301,7 @@ typedef NS_ENUM(NSInteger, BITImageAnnotationViewControllerInteractionMode) {
BITImageAnnotation *candidate = nil; BITImageAnnotation *candidate = nil;
BOOL validView = YES; BOOL validView = YES;
for ( int i = 0; i<gestureRecognizer.numberOfTouches; i++){ for (uint i = 0; i<gestureRecognizer.numberOfTouches; i++){
BITImageAnnotation *newCandidate = (BITImageAnnotation *)[self.view hitTest:[gestureRecognizer locationOfTouch:i inView:self.view] withEvent:nil]; BITImageAnnotation *newCandidate = (BITImageAnnotation *)[self.view hitTest:[gestureRecognizer locationOfTouch:i inView:self.view] withEvent:nil];
if (![newCandidate isKindOfClass:[BITImageAnnotation class]]){ if (![newCandidate isKindOfClass:[BITImageAnnotation class]]){