diff options
author | Elliott Hughes <enh@google.com> | 2014-06-12 18:18:24 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-06-11 21:23:58 +0000 |
commit | d242aff47dc4eaa5081dc7af821308d353cd1090 (patch) | |
tree | abeab7cedf1d0d90a9730b4c9ddedfbdbf3a44f0 | |
parent | b28d37482ed9f179842a991d142bea52d9026d5b (diff) | |
parent | 5204a9e8ca1ca7304db9998dcf3fc5a2d6087662 (diff) | |
download | bionic-d242aff47dc4eaa5081dc7af821308d353cd1090.zip bionic-d242aff47dc4eaa5081dc7af821308d353cd1090.tar.gz bionic-d242aff47dc4eaa5081dc7af821308d353cd1090.tar.bz2 |
Merge "Fix most of the tzcode warnings."
-rw-r--r-- | libc/tzcode/localtime.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libc/tzcode/localtime.c b/libc/tzcode/localtime.c index c40569c..0033652 100644 --- a/libc/tzcode/localtime.c +++ b/libc/tzcode/localtime.c @@ -281,7 +281,7 @@ settzname(void) #endif /* defined ALTZONE */ #ifdef ALL_STATE if (sp == NULL) { - tzname[0] = tzname[1] = gmt; + tzname[0] = tzname[1] = (char *) gmt; return; } #endif /* defined ALL_STATE */ @@ -332,11 +332,11 @@ settzname(void) } static int -differ_by_repeat(const time_t t1, const time_t t0) +differ_by_repeat(const time_t t1 __unused, const time_t t0 __unused) { if (TYPE_BIT(time_t) - TYPE_SIGNED(time_t) < SECSPERREPEAT_BITS) return 0; -#if __LP64__ // 32-bit Android only has a signed 32-bit time_t; 64-bit Android is fixed. +#if defined(__LP64__) // 32-bit Android only has a signed 32-bit time_t; 64-bit Android is fixed. return t1 - t0 == SECSPERREPEAT; #endif } @@ -2108,10 +2108,6 @@ posix2time(time_t t) #include <stdint.h> #include <arpa/inet.h> // For ntohl(3). -static int to_int(unsigned char* s) { - return (s[0] << 24) | (s[1] << 16) | (s[2] << 8) | s[3]; -} - static int __bionic_open_tzdata_path(const char* path_prefix_variable, const char* path_suffix, const char* olson_id, int* data_size) { const char* path_prefix = getenv(path_prefix_variable); |