diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-11-29 15:54:40 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2017-11-29 17:31:33 +0100 |
commit | 8757164ac8f2b033b2b12d4baf075ed18cfeb2b4 (patch) | |
tree | 788aa097c9b079b2c0203be41ece33a49b0a753b /src/parsedate | |
parent | 2eec5a19803a01e21d5793706ae69ac0d886cee5 (diff) | |
download | qtlocation-mapboxgl-8757164ac8f2b033b2b12d4baf075ed18cfeb2b4.tar.gz |
[build] standardize on -fvisibility=hidden for all targets
Enables -fvisibility=hidden for iOS and Linux, and adds a workaround for GCC 6.3-7.1
Adds a GCC 6 build
Enables diagnostics for C files
Fixes a shadow warning in parsedate.c
Diffstat (limited to 'src/parsedate')
-rw-r--r-- | src/parsedate/parsedate.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/parsedate/parsedate.c b/src/parsedate/parsedate.c index 46acceed75..7228c4edbc 100644 --- a/src/parsedate/parsedate.c +++ b/src/parsedate/parsedate.c @@ -418,7 +418,7 @@ static time_t my_timegm(struct my_tm *tm) { static const int month_days_cumulative [12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; - int month, year, leap_days; + int month_, year, leap_days; if(tm->tm_year < 70) /* we don't support years before 1970 as they will cause this function @@ -426,14 +426,14 @@ static time_t my_timegm(struct my_tm *tm) return -1; year = tm->tm_year + 1900; - month = tm->tm_mon; - if(month < 0) { - year += (11 - month) / 12; - month = 11 - (11 - month) % 12; + month_ = tm->tm_mon; + if(month_ < 0) { + year += (11 - month_) / 12; + month_ = 11 - (11 - month_) % 12; } - else if(month >= 12) { - year -= month / 12; - month = month % 12; + else if(month_ >= 12) { + year -= month_ / 12; + month_ = month_ % 12; } leap_days = year - (tm->tm_mon <= 1); @@ -441,7 +441,7 @@ static time_t my_timegm(struct my_tm *tm) - (1969 / 4) + (1969 / 100) - (1969 / 400)); return ((((time_t) (year - 1970) * 365 - + leap_days + month_days_cumulative [month] + tm->tm_mday - 1) * 24 + + leap_days + month_days_cumulative [month_] + tm->tm_mday - 1) * 24 + tm->tm_hour) * 60 + tm->tm_min) * 60 + tm->tm_sec; } |