Removed gcc 4.02 compiler warnings.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21846 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2005-10-19 23:54:22 +00:00
parent 8e111c943a
commit 5cbd31e751
10 changed files with 54 additions and 30 deletions

View file

@ -1,3 +1,16 @@
2005-10-20 Fred Kiefer <FredKiefer@gmx.de>
* Header/NSInputManager.h
* Source/GSTitleView.m
* Source/NSColor.m
* Source/NSImageCell.m
* Source/NSResponder.m
* Source/NSSavePanel.m
* Source/NSTabView.m
* Source/NSTableHeaderView.m
* Source/NSMenuView.m
Removed compiler warnings from gcc 4.0.2.
2005-10-18 Fred Kiefer <FredKiefer@gmx.de> 2005-10-18 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSApplication.m (-terminate:): Call NSDocumentControllers * Source/NSApplication.m (-terminate:): Call NSDocumentControllers

View file

@ -133,7 +133,7 @@
} }
+ (NSInputManager *) currentInputManager; + (NSInputManager *) currentInputManager;
- (id) initWithName: (NSString *)inputServerName - (NSInputManager *) initWithName: (NSString *)inputServerName
host: (NSString *)hostName; host: (NSString *)hostName;
- (BOOL) handleMouseEvent: (NSEvent *)theMouseEvent; - (BOOL) handleMouseEvent: (NSEvent *)theMouseEvent;

View file

@ -351,7 +351,7 @@
} }
// We do not need app menu over menu // We do not need app menu over menu
- (void) rightMouseDown: (NSEvent*)theEvent - (NSMenu *) rightMouseDown: (NSEvent*)theEvent
{ {
} }

View file

@ -1091,7 +1091,8 @@ systemColorWithName(NSString *name)
{ {
data = [aDecoder decodeBytesForKey: @"NSRGB" data = [aDecoder decodeBytesForKey: @"NSRGB"
returnedLength: &length]; returnedLength: &length];
str = [[NSString alloc] initWithCString: data length: length]; str = [[NSString alloc] initWithCString: (const char*)data
length: length];
scanner = [[NSScanner alloc] initWithString: str]; scanner = [[NSScanner alloc] initWithString: str];
[scanner scanFloat: &red]; [scanner scanFloat: &red];
[scanner scanFloat: &green]; [scanner scanFloat: &green];
@ -1128,7 +1129,8 @@ systemColorWithName(NSString *name)
{ {
data = [aDecoder decodeBytesForKey: @"NSWhite" data = [aDecoder decodeBytesForKey: @"NSWhite"
returnedLength: &length]; returnedLength: &length];
str = [[NSString alloc] initWithCString: data length: length]; str = [[NSString alloc] initWithCString: (const char*)data
length: length];
scanner = [[NSScanner alloc] initWithString: str]; scanner = [[NSScanner alloc] initWithString: str];
[scanner scanFloat: &white]; [scanner scanFloat: &white];
RELEASE(scanner); RELEASE(scanner);
@ -1162,7 +1164,8 @@ systemColorWithName(NSString *name)
{ {
data = [aDecoder decodeBytesForKey: @"NSCYMK" data = [aDecoder decodeBytesForKey: @"NSCYMK"
returnedLength: &length]; returnedLength: &length];
str = [[NSString alloc] initWithCString: data length: length]; str = [[NSString alloc] initWithCString: (const char*)data
length: length];
scanner = [[NSScanner alloc] initWithString: str]; scanner = [[NSScanner alloc] initWithString: str];
[scanner scanFloat: &cyan]; [scanner scanFloat: &cyan];
[scanner scanFloat: &yellow]; [scanner scanFloat: &yellow];
@ -1829,7 +1832,9 @@ systemColorWithName(NSString *name)
} }
// FIXME: Missing handling of alpha value // FIXME: Missing handling of alpha value
str = [[NSString alloc] initWithFormat: @"%f", _white_component]; str = [[NSString alloc] initWithFormat: @"%f", _white_component];
[aCoder encodeBytes: [str cString] length: [str cStringLength] forKey: @"NSWhite"]; [aCoder encodeBytes: (const uint8_t*)[str cString]
length: [str cStringLength]
forKey: @"NSWhite"];
RELEASE(str); RELEASE(str);
} }
else else
@ -2127,7 +2132,9 @@ systemColorWithName(NSString *name)
[aCoder encodeInt: 5 forKey: @"NSColorSpace"]; [aCoder encodeInt: 5 forKey: @"NSColorSpace"];
str = [[NSString alloc] initWithFormat: @"%f %f %f %f", _cyan_component, str = [[NSString alloc] initWithFormat: @"%f %f %f %f", _cyan_component,
_magenta_component, _yellow_component, _black_component]; _magenta_component, _yellow_component, _black_component];
[aCoder encodeBytes: [str cString] length: [str cStringLength] forKey: @"NSCYMK"]; [aCoder encodeBytes: (const uint8_t*)[str cString]
length: [str cStringLength]
forKey: @"NSCYMK"];
RELEASE(str); RELEASE(str);
} }
else else
@ -2385,7 +2392,9 @@ systemColorWithName(NSString *name)
// FIXME: Missing handling of alpha value // FIXME: Missing handling of alpha value
str = [[NSString alloc] initWithFormat: @"%f %f %f", _red_component, str = [[NSString alloc] initWithFormat: @"%f %f %f", _red_component,
_green_component, _blue_component]; _green_component, _blue_component];
[aCoder encodeBytes: [str cString] length: [str cStringLength] forKey: @"NSRGB"]; [aCoder encodeBytes: (const uint8_t*)[str cString]
length: [str cStringLength]
forKey: @"NSRGB"];
RELEASE(str); RELEASE(str);
} }
else else

View file

@ -314,6 +314,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
switch (_frameStyle) switch (_frameStyle)
{ {
case NSImageFrameNone: case NSImageFrameNone:
default:
borderSize = NSZeroSize; borderSize = NSZeroSize;
break; break;
case NSImageFramePhoto: case NSImageFramePhoto:
@ -345,6 +346,7 @@ scaleProportionally(NSSize imageSize, NSRect canvasRect)
switch (_frameStyle) switch (_frameStyle)
{ {
case NSImageFrameNone: case NSImageFrameNone:
default:
borderSize = NSZeroSize; borderSize = NSZeroSize;
break; break;
case NSImageFramePhoto: case NSImageFramePhoto:

View file

@ -91,8 +91,8 @@ _addLeftBorderOffsetToRect(NSRect aRect)
return YES; return YES;
} }
// We do not want to popup menus in this menu. // We do not want to popup menus in this menu view.
- (id) menuForEvent: (NSEvent*) theEvent - (NSMenu *) menuForEvent: (NSEvent*) theEvent
{ {
NSDebugLLog (@"NSMenu", @"Query for menu in view"); NSDebugLLog (@"NSMenu", @"Query for menu in view");
return nil; return nil;

View file

@ -60,7 +60,7 @@
/* /*
* Managing the next responder * Managing the next responder
*/ */
- (id) nextResponder - (NSResponder*) nextResponder
{ {
return _next_responder; return _next_responder;
} }

View file

@ -632,7 +632,7 @@ selectCellWithString: (NSString*)title
} }
/** Returns the shared NSSavePanel instance */ /** Returns the shared NSSavePanel instance */
+ (id) savePanel + (NSSavePanel *) savePanel
{ {
if (_gs_gui_save_panel == nil) if (_gs_gui_save_panel == nil)
{ {

View file

@ -357,7 +357,7 @@
NSGraphicsContext *ctxt = GSCurrentContext(); NSGraphicsContext *ctxt = GSCurrentContext();
int howMany = [_items count]; int howMany = [_items count];
int i; int i;
NSRect previousRect; NSRect previousRect = NSMakeRect(0, 0, 0, 0);
int previousState = 0; int previousState = 0;
NSRect aRect = _bounds; NSRect aRect = _bounds;

View file

@ -74,7 +74,7 @@
*/ */
// TODO: Remove this method, if not really needed // TODO: Remove this method, if not really needed
- (NSTableHeaderView*)initWithFrame:(NSRect)frameRect - (id)initWithFrame:(NSRect)frameRect
{ {
self = [super initWithFrame: frameRect]; self = [super initWithFrame: frameRect];
_tableView = nil; _tableView = nil;