diff --git a/Source/NSCalendarDate.m b/Source/NSCalendarDate.m index 001e37da6..09e570fb7 100644 --- a/Source/NSCalendarDate.m +++ b/Source/NSCalendarDate.m @@ -419,32 +419,42 @@ // +++ then there is the time zone if (tzord) - if (zoneByAbbreviation) { - tz = [NSTimeZone timeZoneWithAbbreviation: - [NSString stringWithCString: timez]]; - if (!tz) - tz = [NSTimeZone localTimeZone]; - } - else - { - int tzm, tzh, sign; - - if (tznum < 0) - { - sign = -1; - tznum = -tznum; - } + if (zoneByAbbreviation) + { + tz = [NSTimeZone timeZoneWithAbbreviation: + [NSString stringWithCString: timez]]; + if (!tz) + { + tz = [NSTimeZone localTimeZone]; + } + } else - sign = 1; - tzm = tznum % 100; - tzh = tznum / 100; - tz = [NSTimeZone timeZoneForSecondsFromGMT: (tzh * 60 + tzm) * 60 * sign]; - if (!tz) - tz = [NSTimeZone localTimeZone]; + { + int tzm, tzh, sign; + + if (tznum < 0) + { + sign = -1; + tznum = -tznum; + } + else + { + sign = 1; + } + tzm = tznum % 100; + tzh = tznum / 100; + tz = [NSTimeZone timeZoneForSecondsFromGMT: (tzh*60 + tzm)*60*sign]; + if (!tz) + { + tz = [NSTimeZone localTimeZone]; + } + } } else - tz = [NSTimeZone localTimeZone]; + { + tz = [NSTimeZone localTimeZone]; + } free(newf); @@ -945,15 +955,19 @@ ++i; if (hd >= 12) - if ([a count] > 1) - ampm = [a objectAtIndex: 1]; - else - ampm = @"pm"; + { + if ([a count] > 1) + ampm = [a objectAtIndex: 1]; + else + ampm = @"pm"; + } else - if ([a count] > 0) - ampm = [a objectAtIndex: 0]; - else - ampm = @"am"; + { + if ([a count] > 0) + ampm = [a objectAtIndex: 0]; + else + ampm = @"am"; + } k = VSPRINTF_LENGTH(sprintf(&(buf[j]), [ampm cString])); j += k; } diff --git a/Source/NSConcreteNumber.m b/Source/NSConcreteNumber.m index d11a97fa5..dcfd8ca93 100644 --- a/Source/NSConcreteNumber.m +++ b/Source/NSConcreteNumber.m @@ -159,7 +159,7 @@ - (id)initWithBytes: (const void *)value objCType: (const char *)type { - typedef _dt = data; + typedef __typeof__(data) _dt; data = *(_dt *)value; return self; } @@ -235,7 +235,7 @@ if (o == [other _typeOrder] || o >= [other _nextOrder]) { - typedef _dt = data; + typedef __typeof__(data) _dt; _dt other_data = [other TYPE_METHOD]; if (data == other_data) @@ -328,7 +328,7 @@ - (const char *)objCType { - typedef _dt = data; + typedef __typeof__(data) _dt; return @encode(_dt); }