Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix many gcc 4.2 compiler warnings

  • Loading branch information...
commit 6dcefe5bec67a1cac13d3d9a39858cbf02bf8307 1 parent c6fbccc
Benjamin Kramer d0k authored Pieter de Bie committed
5 PBGitCommitController.m
View
@@ -9,6 +9,7 @@
#import "PBGitCommitController.h"
#import "NSFileHandleExt.h"
#import "PBChangedFile.h"
+#import "PBWebChangesController.h"
@implementation PBGitCommitController
@@ -33,7 +34,7 @@ - (void)awakeFromNib
}
- (void) removeView
{
- [webController closeView];
+ [(PBWebChangesController *)webController closeView];
[super finalize];
}
@@ -315,7 +316,7 @@ - (IBAction) commit:(id) sender
if (ret)
return [self commitFailedBecause:@"Could not update HEAD"];
- [webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]];
+ [(PBWebChangesController *)webController setStateMessage:[NSString stringWithFormat:@"Successfully created commit %@", commit]];
repository.hasChanged = YES;
self.busy--;
6 PBGitIndexController.m
View
@@ -301,7 +301,7 @@ - (void) forceRevertFilesAction:(id) sender
# pragma mark TableView icon delegate
-- (void)tableView:(NSTableView*)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn*)tableColumn row:(int)rowIndex
+- (void)tableView:(NSTableView*)tableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn*)tableColumn row:(NSInteger)rowIndex
{
id controller = [tableView tag] == 0 ? unstagedFilesController : stagedFilesController;
[[tableColumn dataCell] setImage:[[[controller arrangedObjects] objectAtIndex:rowIndex] icon]];
@@ -353,7 +353,7 @@ - (BOOL)tableView:(NSTableView *)tv
- (NSDragOperation)tableView:(NSTableView*)tableView
validateDrop:(id <NSDraggingInfo>)info
- proposedRow:(int)row
+ proposedRow:(NSInteger)row
proposedDropOperation:(NSTableViewDropOperation)operation
{
if ([info draggingSource] == tableView)
@@ -365,7 +365,7 @@ - (NSDragOperation)tableView:(NSTableView*)tableView
- (BOOL)tableView:(NSTableView *)aTableView
acceptDrop:(id <NSDraggingInfo>)info
- row:(int)row
+ row:(NSInteger)row
dropOperation:(NSTableViewDropOperation)operation
{
NSPasteboard* pboard = [info draggingPasteboard];
2  PBIconAndTextCell.mm
View
@@ -26,7 +26,7 @@ - (id)copyWithZone:(NSZone *)zone
return cell;
}
-- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(int)selStart length:(int)selLength
+- (void)selectWithFrame:(NSRect)aRect inView:(NSView *)controlView editor:(NSText *)textObj delegate:(id)anObject start:(NSInteger)selStart length:(NSInteger)selLength
{
NSRect textFrame, imageFrame;
NSDivideRect (aRect, &imageFrame, &textFrame, 3 + [image size].width, NSMinXEdge);
4 PBQLOutlineView.m
View
@@ -62,11 +62,11 @@ - (NSArray *)outlineView:(NSOutlineView *)outlineView namesOfPromisedFilesDroppe
- (BOOL) outlineView: (NSOutlineView *)ov
isItemExpandable: (id)item { return NO; }
-- (int) outlineView: (NSOutlineView *)ov
+- (NSInteger) outlineView: (NSOutlineView *)ov
numberOfChildrenOfItem:(id)item { return 0; }
- (id) outlineView: (NSOutlineView *)ov
- child:(int)index
+ child:(NSInteger)index
ofItem:(id)item { return nil; }
- (id) outlineView: (NSOutlineView *)ov
10 PBRefController.m
View
@@ -21,12 +21,12 @@ - (void)awakeFromNib
[self selectCurrentBranch];
}
-- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(id)context
+- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
- if ([context isEqualToString: @"branchChange"]) {
+ if ([(NSString *)context isEqualToString: @"branchChange"]) {
[self updateBranchMenu];
}
- else if ([context isEqualToString:@"currentBranchChange"]) {
+ else if ([(NSString *)context isEqualToString:@"currentBranchChange"]) {
[self selectCurrentBranch];
}
else {
@@ -102,7 +102,7 @@ - (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexe
- (NSDragOperation)tableView:(NSTableView*)tv
validateDrop:(id <NSDraggingInfo>)info
- proposedRow:(int)row
+ proposedRow:(NSInteger)row
proposedDropOperation:(NSTableViewDropOperation)operation
{
if (operation == NSTableViewDropAbove)
@@ -117,7 +117,7 @@ - (NSDragOperation)tableView:(NSTableView*)tv
- (BOOL)tableView:(NSTableView *)aTableView
acceptDrop:(id <NSDraggingInfo>)info
- row:(int)row
+ row:(NSInteger)row
dropOperation:(NSTableViewDropOperation)operation
{
if (operation != NSTableViewDropOn)
2  PBRepositoryDocumentController.m
View
@@ -60,7 +60,7 @@ - (IBAction)newDocument:(id)sender
if ([op runModal] == NSFileHandlingPanelOKButton)
{
NSString *path = [op filename];
- NSInteger terminationStatus;
+ int terminationStatus;
NSString *result = [PBEasyPipe outputForCommand:[PBGitBinary path] withArgs:[NSArray arrayWithObjects:@"init", @"-q", nil] inDir:path inputString:nil retValue:&terminationStatus];
if (terminationStatus == 0)
4 PBWebDiffController.m
View
@@ -23,9 +23,9 @@ - (void) didLoad
[self showDiff:diffController.diff];
}
-- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(NSString *)context
+- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
- if ([context isEqualToString: @"ChangedDiff"])
+ if ([(NSString *)context isEqualToString: @"ChangedDiff"])
[self showDiff:diffController.diff];
}
4 PBWebHistoryController.m
View
@@ -26,9 +26,9 @@ - (void) didLoad
[self changeContentTo: historyController.webCommit];
}
-- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(NSString *)context
+- (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
{
- if ([context isEqualToString: @"ChangedCommit"])
+ if ([(NSString *)context isEqualToString: @"ChangedCommit"])
[self changeContentTo: historyController.webCommit];
else
[super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
Please sign in to comment.
Something went wrong with that request. Please try again.