diff options
author | Kent Sutherland <git@ksuther.com> | 2014-06-09 22:19:28 -0400 |
---|---|---|
committer | Kent Sutherland <git@ksuther.com> | 2014-06-09 22:19:28 -0400 |
commit | ec1f2915becd2baffcb340449319ad8305be4172 (patch) | |
tree | b0a862f6bc180829a33fe0e740c743d8198ddd46 /src | |
parent | a552a36a00ec70801e71183c646c328ebc8f9900 (diff) | |
download | libical-git-ec1f2915becd2baffcb340449319ad8305be4172.tar.gz |
Removed unused variables from icaltzutil_fetch_timezone.
Removed the unused calculate_pos function.
Diffstat (limited to 'src')
-rw-r--r-- | src/libical/icaltz-util.c | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/libical/icaltz-util.c b/src/libical/icaltz-util.c index fccd081d..1bbcec61 100644 --- a/src/libical/icaltz-util.c +++ b/src/libical/icaltz-util.c @@ -106,8 +106,6 @@ typedef struct char charcnt[4]; } tzinfo; -static int r_pos [] = {1, 2, 3, -2, -1}; - static char *search_paths [] = {"/usr/share/zoneinfo","/usr/lib/zoneinfo","/etc/zoneinfo","/usr/share/lib/zoneinfo"}; static char *zdir = NULL; @@ -204,7 +202,6 @@ set_zonedir (void) } } - const char * icaltzutil_get_zone_directory (void) { @@ -214,21 +211,6 @@ icaltzutil_get_zone_directory (void) return zdir; } -/* Calculate the relative position of the week in a month from a date */ -static int -calculate_pos (icaltimetype icaltime) -{ - int pos; - - pos = (icaltime.day -1) / 7; - - /* Check if pos 3 is the last occurence of the week day in the month */ - if (pos == 3 && ((icaltime.day + 7) > icaltime_days_in_month (icaltime.month, icaltime.year))) - pos = 4; - - return r_pos [pos]; -} - icalcomponent* icaltzutil_fetch_timezone (const char *location) { @@ -237,15 +219,14 @@ icaltzutil_fetch_timezone (const char *location) tzinfo type_cnts; unsigned int i, num_trans, num_types, num_chars, num_leaps, num_isstd, num_isgmt; time_t *transitions = NULL; - time_t trans, start, end; - int *trans_idx = NULL, pos, sign, zidx, zp_idx, idx, prev_idx; + time_t start, end; + int *trans_idx = NULL, idx, prev_idx; ttinfo *types = NULL; char *znames = NULL, *full_path, *tzid, *r_trans, *temp; leap *leaps = NULL; icalcomponent *tz_comp = NULL, *comp = NULL; icalproperty *icalprop; - icaltimetype dtstart, icaltime; - struct icalrecurrencetype ical_recur; + icaltimetype dtstart; const char *basedir; basedir = icaltzutil_get_zone_directory(); |