Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixing compiler warnings.

  • Loading branch information...
commit 28f4c49b489226dd666a1d7d3c47c39cbc12b6e8 1 parent 0765121
Jan Weiß authored committed
View
2  PBEasyPipe.m
@@ -120,7 +120,7 @@ + (NSString*) outputForCommand: (NSString*) cmd withArgs: (NSArray*) args inDir
data = [handle readDataToEndOfFile];
}
@catch (NSException * e) {
- NSLog(@"Got a bad file descriptor in %s!", _cmd);
+ NSLog(@"Got a bad file descriptor in %@!", NSStringFromSelector(_cmd));
if ([NSThread currentThread] != [NSThread mainThread])
[task waitUntilExit];
View
2  PBGitHistoryController.m
@@ -676,7 +676,7 @@ - (NSInteger)numberOfPreviewItemsInPreviewPanel:(id)panel
PBGitTree *treeItem = (PBGitTree *)[[treeController selectedObjects] objectAtIndex:index];
NSURL *previewURL = [NSURL fileURLWithPath:[treeItem tmpFileNameForContents]];
- return (<QLPreviewItem>)previewURL;
+ return (id <QLPreviewItem>)previewURL;
}
#pragma mark <QLPreviewPanelDelegate>
View
2  PBGitRepository.m
@@ -232,7 +232,7 @@ - (void) addRef: (PBGitRef *) ref fromParameters: (NSArray *) components
sha = [PBGitSHA shaWithString:[components objectAtIndex:2]];
NSMutableArray* curRefs;
- if (curRefs = [refs objectForKey:sha])
+ if ( (curRefs = [refs objectForKey:sha]) != nil )
[curRefs addObject:ref];
else
[refs setObject:[NSMutableArray arrayWithObject:ref] forKey:sha];
View
4 PBGitRevList.mm
@@ -165,7 +165,7 @@ - (void) walkRevisionListWithSpecifier:(PBGitRevSpecifier*)rev
if (parentString.size() != 0)
{
if (((parentString.size() + 1) % 41) != 0) {
- NSLog(@"invalid parents: %i", parentString.size());
+ NSLog(@"invalid parents: %zu", parentString.size());
continue;
}
int nParents = (parentString.size() + 1) / 41;
@@ -225,7 +225,7 @@ - (void) walkRevisionListWithSpecifier:(PBGitRevSpecifier*)rev
[self performSelectorOnMainThread:@selector(finishedParsing) withObject:nil waitUntilDone:NO];
}
else {
- NSLog(@"[%@ %s] thread has been canceled", [self class], _cmd);
+ NSLog(@"[%@ %s] thread has been canceled", [self class], NSStringFromSelector(_cmd));
}
[task terminate];
View
6 PBGitSidebarController.m
@@ -125,7 +125,7 @@ - (void) selectCurrentBranch
PBSourceViewItem *item = nil;
for (PBSourceViewItem *it in items)
- if (item = [it findRev:rev])
+ if ( (item = [it findRev:rev]) != nil )
break;
if (!item) {
@@ -133,7 +133,7 @@ - (void) selectCurrentBranch
// Try to find the just added item again.
// TODO: refactor with above.
for (PBSourceViewItem *it in items)
- if (item = [it findRev:rev])
+ if ( (item = [it findRev:rev]) != nil )
break;
}
@@ -147,7 +147,7 @@ - (PBSourceViewItem *) itemForRev:(PBGitRevSpecifier *)rev
{
PBSourceViewItem *foundItem = nil;
for (PBSourceViewItem *item in items)
- if (foundItem = [item findRev:rev])
+ if ( (foundItem = [item findRev:rev]) != nil )
return foundItem;
return nil;
}
View
6 PBGitTree.m
@@ -65,10 +65,12 @@ - (BOOL) isLocallyCached
- (BOOL)hasBinaryHeader:(NSString*)contents
{
- if(!contents)
+ if (!contents)
return NO;
- return [contents rangeOfString:@"\0" options:0 range:NSMakeRange(0, ([contents length] >= 8000) ? 7999 : [contents length])].location != NSNotFound;
+ return [contents rangeOfString:@"\0"
+ options:0
+ range:NSMakeRange(0, ([contents length] >= 8000) ? 7999 : [contents length])].location != NSNotFound;
}
- (BOOL)hasBinaryAttributes
View
2  PBRemoteProgressSheet.m
@@ -130,7 +130,7 @@ - (void) taskCompleted:(NSNotification *)notification
- (void) checkTask:(NSTimer *)timer
{
if (![gitTask isRunning]) {
- NSLog(@"[%@ %s] gitTask terminated without notification", [self class], _cmd);
+ NSLog(@"[%@ %@] gitTask terminated without notification", [self class], NSStringFromSelector(_cmd));
[self taskCompleted:nil];
}
}
View
2  PBSourceViewItem.m
@@ -103,7 +103,7 @@ - (PBSourceViewItem *)findRev:(PBGitRevSpecifier *)rev
PBSourceViewItem *item = nil;
for (PBSourceViewItem *child in children)
- if (item = [child findRev:rev])
+ if ( (item = [child findRev:rev]) != nil )
return item;
return nil;
View
2  gitx.m
@@ -33,7 +33,7 @@
// Now attempt to connect, allowing the app time to startup
int attempt;
for (attempt = 0; proxy == nil && attempt < 50; ++attempt) {
- if (proxy = connect())
+ if ( (proxy = connect()) != nil )
return proxy;
usleep(15000);
Please sign in to comment.
Something went wrong with that request. Please try again.