mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-20 20:26:42 +00:00
fixups in changes made to avoid compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@29261 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
55a9ce06d7
commit
cb1ee03381
9 changed files with 52 additions and 49 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2010-01-11 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSMapTable.m:
|
||||||
|
* Source/NSHashTable.m:
|
||||||
|
* Source/NSPropertyList.m:
|
||||||
|
* Source/GSStream.m:
|
||||||
|
* Source/NSURLResponse.m:
|
||||||
|
* Source/NSPointerArray.m:
|
||||||
|
* Source/Additions/GSMime.m:
|
||||||
|
* Source/NSURLRequest.m:
|
||||||
|
Fix mistaken strategy for avoiding clang warnings.
|
||||||
|
|
||||||
2010-01-11 Fred Kiefer <FredKiefer@gmx.de>
|
2010-01-11 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSConcreteMapTable.m (NSCreateMapTableWithZone): Set the
|
* Source/NSConcreteMapTable.m (NSCreateMapTableWithZone): Set the
|
||||||
|
|
|
@ -2869,11 +2869,13 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation GSMimeHeader
|
@implementation GSMimeHeader
|
||||||
|
|
||||||
static NSCharacterSet *nonToken = nil;
|
static NSCharacterSet *nonToken = nil;
|
||||||
static NSCharacterSet *tokenSet = nil;
|
static NSCharacterSet *tokenSet = nil;
|
||||||
static Class dictClass = 0;
|
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
|
@ -2899,7 +2901,6 @@ static Class dictClass = 0;
|
||||||
{
|
{
|
||||||
documentClass = [GSMimeDocument class];
|
documentClass = [GSMimeDocument class];
|
||||||
}
|
}
|
||||||
dictClass = NSClassFromString(@"_GSMutableInsensitiveDictionary");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3496,7 +3497,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
||||||
{
|
{
|
||||||
if (params == nil)
|
if (params == nil)
|
||||||
{
|
{
|
||||||
params = [dictClass new];
|
params = [_GSMutableInsensitiveDictionary new];
|
||||||
}
|
}
|
||||||
[params setObject: v forKey: k];
|
[params setObject: v forKey: k];
|
||||||
}
|
}
|
||||||
|
@ -3516,7 +3517,7 @@ appendString(NSMutableData *m, unsigned offset, unsigned fold,
|
||||||
NSEnumerator *e = [d keyEnumerator];
|
NSEnumerator *e = [d keyEnumerator];
|
||||||
NSString *k;
|
NSString *k;
|
||||||
|
|
||||||
m = [[dictClass alloc] initWithCapacity: c];
|
m = [[_GSMutableInsensitiveDictionary alloc] initWithCapacity: c];
|
||||||
while ((k = [e nextObject]) != nil)
|
while ((k = [e nextObject]) != nil)
|
||||||
{
|
{
|
||||||
[m setObject: [d objectForKey: k]
|
[m setObject: [d objectForKey: k]
|
||||||
|
|
|
@ -945,18 +945,14 @@ static RunLoopEventType typeForStream(NSStream *aStream)
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface GSLocalServerStream : GSServerStream
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation GSServerStream
|
@implementation GSServerStream
|
||||||
|
|
||||||
static Class localServerClass = 0;
|
|
||||||
|
|
||||||
+ (void) initialize
|
+ (void) initialize
|
||||||
{
|
{
|
||||||
GSMakeWeakPointer(self, "delegate");
|
GSMakeWeakPointer(self, "delegate");
|
||||||
if (localServerClass == 0)
|
|
||||||
{
|
|
||||||
localServerClass = NSClassFromString(@"GSLocalServerStream");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port
|
+ (id) serverStreamToAddr: (NSString*)addr port: (NSInteger)port
|
||||||
|
@ -972,7 +968,7 @@ static Class localServerClass = 0;
|
||||||
|
|
||||||
+ (id) serverStreamToAddr: (NSString*)addr
|
+ (id) serverStreamToAddr: (NSString*)addr
|
||||||
{
|
{
|
||||||
return AUTORELEASE([[localServerClass alloc] initToAddr: addr]);
|
return AUTORELEASE([[GSLocalServerStream alloc] initToAddr: addr]);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
- (id) initToAddr: (NSString*)addr port: (NSInteger)port
|
||||||
|
@ -988,7 +984,7 @@ static Class localServerClass = 0;
|
||||||
- (id) initToAddr: (NSString*)addr
|
- (id) initToAddr: (NSString*)addr
|
||||||
{
|
{
|
||||||
RELEASE(self);
|
RELEASE(self);
|
||||||
return [[localServerClass alloc] initToAddr: addr];
|
return [[GSLocalServerStream alloc] initToAddr: addr];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) acceptWithInputStream: (NSInputStream **)inputStream
|
- (void) acceptWithInputStream: (NSInputStream **)inputStream
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
#include "NSCallBacks.h"
|
#include "NSCallBacks.h"
|
||||||
#include "GSPrivate.h"
|
#include "GSPrivate.h"
|
||||||
|
|
||||||
|
@interface NSConcreteHashTable : NSHashTable
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation NSHashTable
|
@implementation NSHashTable
|
||||||
|
|
||||||
|
|
||||||
|
@ -57,7 +60,7 @@ static Class concreteClass = 0;
|
||||||
if (abstractClass == 0)
|
if (abstractClass == 0)
|
||||||
{
|
{
|
||||||
abstractClass = [NSHashTable class];
|
abstractClass = [NSHashTable class];
|
||||||
concreteClass = NSClassFromString(@"NSConcreteHashTable");
|
concreteClass = [NSConcreteHashTable class];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,9 @@
|
||||||
#include "Foundation/NSDebug.h"
|
#include "Foundation/NSDebug.h"
|
||||||
#include "NSCallBacks.h"
|
#include "NSCallBacks.h"
|
||||||
|
|
||||||
|
@interface NSConcreteMapTable : NSMapTable
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation NSMapTable
|
@implementation NSMapTable
|
||||||
|
|
||||||
static Class abstractClass = 0;
|
static Class abstractClass = 0;
|
||||||
|
@ -55,7 +58,7 @@ static Class concreteClass = 0;
|
||||||
if (abstractClass == 0)
|
if (abstractClass == 0)
|
||||||
{
|
{
|
||||||
abstractClass = [NSMapTable class];
|
abstractClass = [NSMapTable class];
|
||||||
concreteClass = NSClassFromString(@"NSConcreteMapTable");
|
concreteClass = [NSConcreteMapTable class];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,16 @@
|
||||||
static Class abstractClass = Nil;
|
static Class abstractClass = Nil;
|
||||||
static Class concreteClass = Nil;
|
static Class concreteClass = Nil;
|
||||||
|
|
||||||
|
@interface NSConcretePointerArray : NSPointerArray
|
||||||
|
{
|
||||||
|
PFInfo _pf;
|
||||||
|
NSUInteger _count;
|
||||||
|
void **_contents;
|
||||||
|
unsigned _capacity;
|
||||||
|
unsigned _grow_factor;
|
||||||
|
}
|
||||||
|
@end
|
||||||
|
|
||||||
|
|
||||||
@implementation NSPointerArray
|
@implementation NSPointerArray
|
||||||
|
|
||||||
|
@ -58,7 +68,7 @@ static Class concreteClass = Nil;
|
||||||
if (abstractClass == Nil)
|
if (abstractClass == Nil)
|
||||||
{
|
{
|
||||||
abstractClass = [NSPointerArray class];
|
abstractClass = [NSPointerArray class];
|
||||||
concreteClass = NSClassFromString(@"NSConcretePointerArray");
|
concreteClass = [NSConcretePointerArray class];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -202,16 +212,6 @@ static Class concreteClass = Nil;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSConcretePointerArray : NSPointerArray
|
|
||||||
{
|
|
||||||
PFInfo _pf;
|
|
||||||
NSUInteger _count;
|
|
||||||
void **_contents;
|
|
||||||
unsigned _capacity;
|
|
||||||
unsigned _grow_factor;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
|
|
||||||
@implementation NSConcretePointerArray
|
@implementation NSConcretePointerArray
|
||||||
|
|
||||||
- (void) _raiseRangeExceptionWithIndex: (NSUInteger)index from: (SEL)sel
|
- (void) _raiseRangeExceptionWithIndex: (NSUInteger)index from: (SEL)sel
|
||||||
|
|
|
@ -112,15 +112,11 @@ extern BOOL GSScanDouble(unichar*, unsigned, double*);
|
||||||
- (void) unescape;
|
- (void) unescape;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@interface GSSloppyXMLParser : NSXMLParser
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation GSXMLPListParser
|
@implementation GSXMLPListParser
|
||||||
|
|
||||||
static Class theClass = 0;
|
|
||||||
|
|
||||||
+ (void) initialize
|
|
||||||
{
|
|
||||||
theClass = NSClassFromString(@"GSSloppyXMLParser");
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
RELEASE(key);
|
RELEASE(key);
|
||||||
|
@ -136,7 +132,7 @@ static Class theClass = 0;
|
||||||
{
|
{
|
||||||
if ((self = [super init]) != nil)
|
if ((self = [super init]) != nil)
|
||||||
{
|
{
|
||||||
theParser = [[theClass alloc] initWithData: data];
|
theParser = [[GSSloppyXMLParser alloc] initWithData: data];
|
||||||
[theParser setDelegate: self];
|
[theParser setDelegate: self];
|
||||||
opts = options;
|
opts = options;
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,6 +51,9 @@ typedef struct {
|
||||||
#define this ((Internal*)(((priv*)self)->_NSURLRequestInternal))
|
#define this ((Internal*)(((priv*)self)->_NSURLRequestInternal))
|
||||||
#define inst ((Internal*)(((priv*)o)->_NSURLRequestInternal))
|
#define inst ((Internal*)(((priv*)o)->_NSURLRequestInternal))
|
||||||
|
|
||||||
|
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation NSURLRequest
|
@implementation NSURLRequest
|
||||||
|
|
||||||
+ (id) allocWithZone: (NSZone*)z
|
+ (id) allocWithZone: (NSZone*)z
|
||||||
|
@ -354,13 +357,6 @@ typedef struct {
|
||||||
|
|
||||||
@implementation NSMutableURLRequest (NSMutableHTTPURLRequest)
|
@implementation NSMutableURLRequest (NSMutableHTTPURLRequest)
|
||||||
|
|
||||||
static Class dictClass = 0;
|
|
||||||
|
|
||||||
+ (void) initialize
|
|
||||||
{
|
|
||||||
dictClass = NSClassFromString(@"_GSMutableInsensitiveDictionary");
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) addValue: (NSString *)value forHTTPHeaderField: (NSString *)field
|
- (void) addValue: (NSString *)value forHTTPHeaderField: (NSString *)field
|
||||||
{
|
{
|
||||||
NSString *old = [self valueForHTTPHeaderField: field];
|
NSString *old = [self valueForHTTPHeaderField: field];
|
||||||
|
@ -422,7 +418,7 @@ static Class dictClass = 0;
|
||||||
{
|
{
|
||||||
if (this->headers == nil)
|
if (this->headers == nil)
|
||||||
{
|
{
|
||||||
this->headers = [dictClass new];
|
this->headers = [_GSMutableInsensitiveDictionary new];
|
||||||
}
|
}
|
||||||
[this->headers setObject: value forKey: field];
|
[this->headers setObject: value forKey: field];
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,15 +50,11 @@ typedef struct {
|
||||||
#define inst ((Internal*)(((priv*)o)->_NSURLResponseInternal))
|
#define inst ((Internal*)(((priv*)o)->_NSURLResponseInternal))
|
||||||
|
|
||||||
|
|
||||||
|
@interface _GSMutableInsensitiveDictionary : NSMutableDictionary
|
||||||
|
@end
|
||||||
|
|
||||||
@implementation NSURLResponse (Private)
|
@implementation NSURLResponse (Private)
|
||||||
|
|
||||||
static Class dictClass = 0;
|
|
||||||
|
|
||||||
+ (void) initialize
|
|
||||||
{
|
|
||||||
dictClass = NSClassFromString(@"_GSMutableInsensitiveDictionary");
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void) _setHeaders: (id)headers
|
- (void) _setHeaders: (id)headers
|
||||||
{
|
{
|
||||||
NSEnumerator *e;
|
NSEnumerator *e;
|
||||||
|
@ -137,7 +133,7 @@ static Class dictClass = 0;
|
||||||
{
|
{
|
||||||
if (this->headers == 0)
|
if (this->headers == 0)
|
||||||
{
|
{
|
||||||
this->headers = [dictClass new];
|
this->headers = [_GSMutableInsensitiveDictionary new];
|
||||||
}
|
}
|
||||||
[this->headers setObject: value forKey: field];
|
[this->headers setObject: value forKey: field];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue