Removed a few compiler warnings found by gcc 4.6

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34344 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2011-12-22 09:16:04 +00:00
parent 52b39d8923
commit 12bbf00d16
6 changed files with 52 additions and 30 deletions

View file

@ -1,3 +1,14 @@
2011-12-22 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSPrintOperation.m (-_print): Remove unused variable.
* Source/GSLayoutManager.m (-_generateRunsToCharacter:): Remove
unused variable.
* Source/NSToolbar.m (-initWithCoder:): Don't call non-exisiting
super method.
* Source/GSNibLoading.m (-nibInstantiate): Add type cast for toolbar.
* TextConverters/RTF/RTFProducer.m (-_addAttributesString:): Use
destString instead of dest when writing the NSLinkAttributeName.
2011-12-20 Eric Wasylishen <ewasylishen@gmail.com>
* Source/NSBrowserCell.m (-drawInteriorWithFrame:inView:):

View file

@ -498,7 +498,6 @@ Private method used internally by GSLayoutManager for sanity checking.
-(void) _generateRunsToCharacter: (unsigned int)last
{
glyph_run_head_t *context[SKIP_LIST_DEPTH];
int positions[SKIP_LIST_DEPTH];
glyph_run_head_t *h;
unsigned int pos;
unsigned int length;
@ -518,7 +517,6 @@ Private method used internally by GSLayoutManager for sanity checking.
{
while (h->next) pos += h->char_length, h = h->next;
context[level - 1] = h;
positions[level - 1] = pos;
h++;
}
h--;

View file

@ -481,7 +481,8 @@ static BOOL _isInInterfaceBuilder = NO;
if ([_viewClass isKindOfClass: [NSToolbar class]])
{
[_realObject setToolbar: _viewClass];
// FIXME: No idea what is going on here
[_realObject setToolbar: (NSToolbar*)_viewClass];
}
[_view _fixSubviews];

View file

@ -1026,10 +1026,9 @@ scaleRect(NSRect rect, double scale)
{
/* Calculate page rects we aren't processing to catch up to the
first page we are */
NSRect pageRect;
pageRect = [self _adjustPagesFirst: 1
last: _currentPage - 1
info: &info];
[self _adjustPagesFirst: 1
last: _currentPage - 1
info: &info];
}
/* Print the header information */

View file

@ -564,37 +564,52 @@ static GSValidationCenter *vc = nil;
return result;
}
- (void) encodeWithCoder: (NSCoder*)aCoder
{
if ([aCoder allowsKeyedCoding])
{
// FIXME
}
else
{
// FIXME
}
}
- (id) initWithCoder: (NSCoder *)aCoder
{
self = [super initWithCoder: aCoder];
_identifier = [[aCoder decodeObjectForKey:@"NSToolbarIdentifier"] retain];
_items = [[NSMutableArray alloc] init];
if ([aCoder allowsKeyedCoding])
{
ASSIGN(_identifier, [aCoder decodeObjectForKey:@"NSToolbarIdentifier"]);
_items = [[NSMutableArray alloc] init];
_configurationDictionary = nil;
_customizationPaletteIsRunning = NO;
ASSIGN(_interfaceBuilderItemsByIdentifier, [aCoder decodeObjectForKey: @"NSToolbarIBIdentifiedItems"]);
ASSIGN(_interfaceBuilderAllowedItemIdentifiers, [self _identifiersForItems: [aCoder decodeObjectForKey: @"NSToolbarIBAllowedItems"]]);
ASSIGN(_interfaceBuilderDefaultItemIdentifiers, [self _identifiersForItems: [aCoder decodeObjectForKey: @"NSToolbarIBDefaultItems"]]);
ASSIGN(_interfaceBuilderSelectableItemIdentifiers, [self _identifiersForItems: [aCoder decodeObjectForKey: @"NSToolbarIBSelectableItems"]]);
_customizationPaletteIsRunning = NO;
_configurationDictionary = nil;
ASSIGN(_interfaceBuilderItemsByIdentifier, [aCoder decodeObjectForKey: @"NSToolbarIBIdentifiedItems"]);
ASSIGN(_interfaceBuilderAllowedItemIdentifiers, [self _identifiersForItems: [aCoder decodeObjectForKey: @"NSToolbarIBAllowedItems"]]);
ASSIGN(_interfaceBuilderDefaultItemIdentifiers, [self _identifiersForItems: [aCoder decodeObjectForKey: @"NSToolbarIBDefaultItems"]]);
ASSIGN(_interfaceBuilderSelectableItemIdentifiers, [self _identifiersForItems: [aCoder decodeObjectForKey: @"NSToolbarIBSelectableItems"]]);
[self setAllowsUserCustomization: [aCoder decodeBoolForKey: @"NSToolbarAllowsUserCustomization"]];
[self setAutosavesConfiguration: [aCoder decodeBoolForKey: @"NSToolbarAutosavesConfiguration"]];
[self setDisplayMode: [aCoder decodeIntForKey: @"NSToolbarDisplayMode"]];
[self setShowsBaselineSeparator: [aCoder decodeBoolForKey: @"NSToolbarShowsBaselineSeparator"]];
[self setSizeMode: [aCoder decodeIntForKey: @"NSToolbarSizeMode"]];
[self setVisible: [aCoder decodeBoolForKey: @"NSToolbarPrefersToBeShown"]];
[self setDelegate: [aCoder decodeObjectForKey: @"NSToolbarDelegate"]];
}
else
{
// FIXME
}
// Store in list of toolbars
[toolbars addObject: self];
[self setAllowsUserCustomization: [aCoder decodeBoolForKey: @"NSToolbarAllowsUserCustomization"]];
[self setAutosavesConfiguration: [aCoder decodeBoolForKey: @"NSToolbarAutosavesConfiguration"]];
[self setDisplayMode: [aCoder decodeIntForKey: @"NSToolbarDisplayMode"]];
[self setShowsBaselineSeparator: [aCoder decodeBoolForKey: @"NSToolbarShowsBaselineSeparator"]];
[self setSizeMode: [aCoder decodeIntForKey: @"NSToolbarSizeMode"]];
[self setVisible: [aCoder decodeBoolForKey: @"NSToolbarPrefersToBeShown"]];
[self setDelegate: [aCoder decodeObjectForKey: @"NSToolbarDelegate"]];
return self;
}
//FIXME: encodeWithCoder
- (void) dealloc
{
//NSLog(@"Toolbar dealloc %@", self);

View file

@ -1108,7 +1108,7 @@
// concatenate into the RTF stream
[result appendString:
[NSString stringWithFormat: @"{\\field{\\*\\fldinst HYPERLINK \"%@\"}{\\fldrslt ", dest]];
[NSString stringWithFormat: @"{\\field{\\*\\fldinst HYPERLINK \"%@\"}{\\fldrslt ", destString]];
}
else
{
@ -1186,13 +1186,11 @@
{
NSString *string;
NSMutableString *result;
unsigned loc;
unsigned length;
NSRange effectiveRange;
string = [text string];
result = (NSMutableString *)[NSMutableString string];
loc = 0;
length = [string length];
effectiveRange = NSMakeRange(0, 0);