mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +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
7bdcaab4f2
commit
203b566de3
2 changed files with 47 additions and 33 deletions
|
@ -419,32 +419,42 @@
|
||||||
|
|
||||||
// +++ then there is the time zone
|
// +++ then there is the time zone
|
||||||
if (tzord)
|
if (tzord)
|
||||||
if (zoneByAbbreviation)
|
|
||||||
{
|
{
|
||||||
tz = [NSTimeZone timeZoneWithAbbreviation:
|
if (zoneByAbbreviation)
|
||||||
[NSString stringWithCString: timez]];
|
{
|
||||||
if (!tz)
|
tz = [NSTimeZone timeZoneWithAbbreviation:
|
||||||
tz = [NSTimeZone localTimeZone];
|
[NSString stringWithCString: timez]];
|
||||||
}
|
if (!tz)
|
||||||
else
|
{
|
||||||
{
|
tz = [NSTimeZone localTimeZone];
|
||||||
int tzm, tzh, sign;
|
}
|
||||||
|
}
|
||||||
if (tznum < 0)
|
|
||||||
{
|
|
||||||
sign = -1;
|
|
||||||
tznum = -tznum;
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
sign = 1;
|
{
|
||||||
tzm = tznum % 100;
|
int tzm, tzh, sign;
|
||||||
tzh = tznum / 100;
|
|
||||||
tz = [NSTimeZone timeZoneForSecondsFromGMT: (tzh * 60 + tzm) * 60 * sign];
|
if (tznum < 0)
|
||||||
if (!tz)
|
{
|
||||||
tz = [NSTimeZone localTimeZone];
|
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
|
else
|
||||||
tz = [NSTimeZone localTimeZone];
|
{
|
||||||
|
tz = [NSTimeZone localTimeZone];
|
||||||
|
}
|
||||||
|
|
||||||
free(newf);
|
free(newf);
|
||||||
|
|
||||||
|
@ -945,15 +955,19 @@
|
||||||
|
|
||||||
++i;
|
++i;
|
||||||
if (hd >= 12)
|
if (hd >= 12)
|
||||||
if ([a count] > 1)
|
{
|
||||||
ampm = [a objectAtIndex: 1];
|
if ([a count] > 1)
|
||||||
else
|
ampm = [a objectAtIndex: 1];
|
||||||
ampm = @"pm";
|
else
|
||||||
|
ampm = @"pm";
|
||||||
|
}
|
||||||
else
|
else
|
||||||
if ([a count] > 0)
|
{
|
||||||
ampm = [a objectAtIndex: 0];
|
if ([a count] > 0)
|
||||||
else
|
ampm = [a objectAtIndex: 0];
|
||||||
ampm = @"am";
|
else
|
||||||
|
ampm = @"am";
|
||||||
|
}
|
||||||
k = VSPRINTF_LENGTH(sprintf(&(buf[j]), [ampm cString]));
|
k = VSPRINTF_LENGTH(sprintf(&(buf[j]), [ampm cString]));
|
||||||
j += k;
|
j += k;
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,7 +159,7 @@
|
||||||
|
|
||||||
- (id)initWithBytes: (const void *)value objCType: (const char *)type
|
- (id)initWithBytes: (const void *)value objCType: (const char *)type
|
||||||
{
|
{
|
||||||
typedef _dt = data;
|
typedef __typeof__(data) _dt;
|
||||||
data = *(_dt *)value;
|
data = *(_dt *)value;
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
@ -235,7 +235,7 @@
|
||||||
|
|
||||||
if (o == [other _typeOrder] || o >= [other _nextOrder])
|
if (o == [other _typeOrder] || o >= [other _nextOrder])
|
||||||
{
|
{
|
||||||
typedef _dt = data;
|
typedef __typeof__(data) _dt;
|
||||||
_dt other_data = [other TYPE_METHOD];
|
_dt other_data = [other TYPE_METHOD];
|
||||||
|
|
||||||
if (data == other_data)
|
if (data == other_data)
|
||||||
|
@ -328,7 +328,7 @@
|
||||||
|
|
||||||
- (const char *)objCType
|
- (const char *)objCType
|
||||||
{
|
{
|
||||||
typedef _dt = data;
|
typedef __typeof__(data) _dt;
|
||||||
return @encode(_dt);
|
return @encode(_dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue