avoid some compiler warnings

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@31107 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2010-08-10 10:38:50 +00:00
parent 916036fa6d
commit 50662ad093
8 changed files with 36 additions and 15 deletions

View file

@ -1,3 +1,14 @@
2010-08-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSRunLoop.m:
* Source/NSURLProtocol.m:
* Source/GSAttributedString.m:
* Source/ObjectiveC2/properties.m:
* Source/NSProtocolChecker.m:
* Source/NSDistantObject.m:
* Tools/gdomap.c:
Functionless changes to avoid compiler warnings reported by Fred.
2010-08-07 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSCalendarDate.m: Fix for %p AM/PM parsing to implicitly set

View file

@ -625,8 +625,10 @@ SANITY();
- (void) setAttributes: (NSDictionary*)attributes
range: (NSRange)range
{
unsigned tmpLength, arrayIndex, arraySize;
NSRange effectiveRange;
unsigned tmpLength;
unsigned arrayIndex = 0;
unsigned arraySize;
NSRange effectiveRange = NSMakeRange(0, NSNotFound);
unsigned afterRangeLoc, beginRangeLoc;
NSDictionary *attrs;
NSZone *z = [self zone];
@ -751,8 +753,10 @@ SANITY();
- (void) replaceCharactersInRange: (NSRange)range
withString: (NSString*)aString
{
unsigned tmpLength, arrayIndex, arraySize;
NSRange effectiveRange;
unsigned tmpLength;
unsigned arrayIndex = 0;
unsigned arraySize;
NSRange effectiveRange = NSMakeRange(0, NSNotFound);
NSDictionary *attrs;
GSAttrInfo *info;
int moveLocations;

View file

@ -717,7 +717,7 @@ enum proxyLocation
if ((uintptr_t)object_getClass(_protocol) == 0x2)
{
extern struct objc_method_description*
GSDescriptionForInstanceMethod();
GSDescriptionForInstanceMethod(Protocol *self, SEL aSel);
mth = GSDescriptionForInstanceMethod(_protocol, aSelector);
}
else
@ -729,7 +729,7 @@ enum proxyLocation
if ((uintptr_t)object_getClass(_protocol) == 0x2)
{
extern struct objc_method_description*
GSDescriptionForClassMethod();
GSDescriptionForClassMethod(Protocol *self, SEL aSel);
mth = GSDescriptionForClassMethod(_protocol, aSelector);
}
else

View file

@ -74,8 +74,10 @@
- (struct objc_method_description*) _methodDescription: (SEL)aSelector
{
extern struct objc_method_description *GSDescriptionForInstanceMethod();
extern struct objc_method_description *GSDescriptionForClassMethod();
extern struct objc_method_description
*GSDescriptionForInstanceMethod(Protocol *self, SEL aSel);
extern struct objc_method_description
*GSDescriptionForClassMethod(Protocol *self, SEL aSel);
if (_myProtocol != nil && _myTarget != nil)
{

View file

@ -958,6 +958,8 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
unsigned c;
unsigned i;
ei = 0.0; // Only needed to avoid compiler warning
/*
* Save current time so we don't keep redoing system call to
* get it and so that we check timer fire dates against a known
@ -1005,7 +1007,7 @@ updateTimer(NSTimer *t, NSDate *d, NSTimeInterval now)
{
GSIArrayRemoveItemAtIndexNoRelease(timers, i);
[t fire];
GSPrivateNotifyASAP(_currentMode); /* Post notifications. */
GSPrivateNotifyASAP(_currentMode);
IF_NO_GC([arp emptyPool]);
if (updateTimer(t, d, now) == YES)
{

View file

@ -916,7 +916,8 @@ static NSURLProtocol *placeholder = nil;
* it should be cached.
*/
policy = [this->request cachePolicy];
if (policy == NSURLRequestUseProtocolCachePolicy)
if (policy
== (NSURLCacheStoragePolicy)NSURLRequestUseProtocolCachePolicy)
{
if ([self isKindOfClass: [_NSHTTPSURLProtocol class]] == YES)
{
@ -1074,7 +1075,8 @@ static NSURLProtocol *placeholder = nil;
* it should be cached.
*/
policy = [this->request cachePolicy];
if (policy == NSURLRequestUseProtocolCachePolicy)
if (policy == (NSURLCacheStoragePolicy)
NSURLRequestUseProtocolCachePolicy)
{
if ([self isKindOfClass: [_NSHTTPSURLProtocol class]])
{

View file

@ -51,7 +51,7 @@ objc_getProperty(id obj, SEL _cmd, ptrdiff_t offset, BOOL isAtomic)
if (isAtomic)
{
id result;
id result = nil;
SYNCBEG(obj)
result = objc_getProperty(obj, _cmd, offset, NO);

View file

@ -2067,9 +2067,9 @@ init_probe()
int elen = 0;
struct in_addr *other;
struct in_addr sin;
int high;
int low;
unsigned long net;
int high = 0;
int low = 0;
unsigned long net = 0;
int j;
struct in_addr b;