Avoid compiler warnings from old compilers.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@30089 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2010-04-05 18:20:24 +00:00
parent b3bb898eba
commit d4b51a7b63
3 changed files with 38 additions and 9 deletions

View file

@ -1,3 +1,8 @@
2010-04-05 Fred Kiefer <FredKiefer@gmx.de>
* Source/GSGModelLoader.m,
* Source/GSXibLoader.m: Avoid compiler warnings from old compilers.
2010-04-05 Doug Simons <doug.simons@testplant.com> 2010-04-05 Doug Simons <doug.simons@testplant.com>
* Source/NSView.m: Fix the worst problems with key view * Source/NSView.m: Fix the worst problems with key view

View file

@ -26,8 +26,10 @@
Boston, MA 02110-1301, USA. Boston, MA 02110-1301, USA.
*/ */
#import <Foundation/NSArray.h>
#import <Foundation/NSBundle.h> #import <Foundation/NSBundle.h>
#import <Foundation/NSDebug.h> #import <Foundation/NSDebug.h>
#import <Foundation/NSDictionary.h>
#import <Foundation/NSEnumerator.h> #import <Foundation/NSEnumerator.h>
#import <Foundation/NSException.h> #import <Foundation/NSException.h>
#import <Foundation/NSFileManager.h> #import <Foundation/NSFileManager.h>

View file

@ -195,12 +195,14 @@
@end @end
@interface IBConnection: NSObject @interface IBConnection: NSObject <NSCoding>
{ {
NSString *label; NSString *label;
id source; id source;
id destination; id destination;
} }
- (id) nibInstantiate;
- (void) establishConnection;
@end @end
@implementation IBConnection @implementation IBConnection
@ -231,6 +233,11 @@
return self; return self;
} }
- (void) encodeWithCoder: (NSCoder*)aCoder
{
// FIXME
}
- (void) dealloc - (void) dealloc
{ {
DESTROY(label); DESTROY(label);
@ -464,7 +471,7 @@
@end @end
@interface IBObjectContainer: NSObject @interface IBObjectContainer: NSObject <NSCoding>
{ {
NSMutableArray *connectionRecords; NSMutableArray *connectionRecords;
IBMutableOrderedSet *objectRecords; IBMutableOrderedSet *objectRecords;
@ -475,6 +482,7 @@
id sourceID; id sourceID;
int maxID; int maxID;
} }
- (id) nibInstantiate;
@end @end
@implementation IBObjectContainer @implementation IBObjectContainer
@ -502,6 +510,11 @@
return self; return self;
} }
- (void) encodeWithCoder: (NSCoder*)aCoder
{
// FIXME
}
- (void) dealloc - (void) dealloc
{ {
DESTROY(connectionRecords); DESTROY(connectionRecords);
@ -542,6 +555,15 @@
NSMutableDictionary *elements; NSMutableDictionary *elements;
NSMutableArray *values; NSMutableArray *values;
} }
- (NSString*) type;
- (NSString*) value;
- (NSDictionary*) elements;
- (NSArray*) values;
- (void) addElement: (GSXibElement*)element;
- (void) setElement: (GSXibElement*)element forKey: (NSString*)key;
- (void) setValue: (NSString*)text;
- (NSString*) attributeForKey: (NSString*)key;
- (GSXibElement*) elementForKey: (NSString*)key;
@end @end
@interface GSXibKeyedUnarchiver: NSKeyedUnarchiver @interface GSXibKeyedUnarchiver: NSKeyedUnarchiver
@ -892,7 +914,7 @@ didStartElement: (NSString *)elementName
NSString *classname = [element attributeForKey: @"class"]; NSString *classname = [element attributeForKey: @"class"];
Class c = [self classForClassName: classname]; Class c = [self classForClassName: classname];
id o, r; id o, r;
id _delegate = [self delegate]; id delegate = [self delegate];
if (c == nil) if (c == nil)
{ {
@ -902,7 +924,7 @@ didStartElement: (NSString *)elementName
c = NSClassFromString(classname); c = NSClassFromString(classname);
if (c == nil) if (c == nil)
{ {
c = [_delegate unarchiver: self c = [delegate unarchiver: self
cannotDecodeObjectOfClassName: classname cannotDecodeObjectOfClassName: classname
originalClasses: nil]; originalClasses: nil];
if (c == nil) if (c == nil)
@ -929,7 +951,7 @@ didStartElement: (NSString *)elementName
r = [o initWithCoder: self]; r = [o initWithCoder: self];
if (r != o) if (r != o)
{ {
[_delegate unarchiver: self [delegate unarchiver: self
willReplaceObject: o willReplaceObject: o
withObject: r]; withObject: r];
o = r; o = r;
@ -939,19 +961,19 @@ didStartElement: (NSString *)elementName
r = [o awakeAfterUsingCoder: self]; r = [o awakeAfterUsingCoder: self];
if (r != o) if (r != o)
{ {
[_delegate unarchiver: self [delegate unarchiver: self
willReplaceObject: o willReplaceObject: o
withObject: r]; withObject: r];
o = r; o = r;
if (key != nil) if (key != nil)
[decoded setObject: o forKey: key]; [decoded setObject: o forKey: key];
} }
if (_delegate != nil) if (delegate != nil)
{ {
r = [_delegate unarchiver: self didDecodeObject: o]; r = [delegate unarchiver: self didDecodeObject: o];
if (r != o) if (r != o)
{ {
[_delegate unarchiver: self [delegate unarchiver: self
willReplaceObject: o willReplaceObject: o
withObject: r]; withObject: r];
o = r; o = r;