mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Avoid a couple more compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@4473 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a9a14679a7
commit
6eb542e05c
2 changed files with 47 additions and 33 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue