diff --git a/ChangeLog b/ChangeLog index 83a06ecb2..418ac61b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-05-28 Fred Kiefer + + * Source/NSNotificationCenter.m, + * Source/NSUserDefaults.m: Remove compiler warnings. + 2011-05-28 18:05 David Chisnall * libs/base/trunk/Source/NSPointerArray.m: diff --git a/Source/NSNotificationCenter.m b/Source/NSNotificationCenter.m index e730b1ce9..32a06935e 100644 --- a/Source/NSNotificationCenter.m +++ b/Source/NSNotificationCenter.m @@ -316,6 +316,8 @@ static Observation *obsNew(NCTable* t) { static Class observationClass; static size_t observationSize; + Observation *obs; + if (0 == observationClass) { observationClass = [GSObservation class]; @@ -324,7 +326,6 @@ static Observation *obsNew(NCTable* t) #if __OBJC_GC__ return NSAllocateObject(observationClass, 0, _zone); #else - Observation *obs; if (t->freeList == 0) { diff --git a/Source/NSUserDefaults.m b/Source/NSUserDefaults.m index a0dcb2597..81dc96e6e 100644 --- a/Source/NSUserDefaults.m +++ b/Source/NSUserDefaults.m @@ -386,16 +386,12 @@ newLanguages(NSArray *oldNames) + (void) resetStandardUserDefaults { - NSDictionary *regDefs; + NSDictionary *regDefs = nil; [classLock lock]; NS_DURING { - if (nil == sharedDefaults) - { - regDefs = nil; - } - else + if (nil != sharedDefaults) { /* Extract the registration domain from the old defaults. */