diff options
author | Elliott Hughes <enh@google.com> | 2014-06-11 17:15:56 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-06-11 17:15:56 -0700 |
commit | 5204a9e8ca1ca7304db9998dcf3fc5a2d6087662 (patch) | |
tree | af11fa34fe7eb8c84e33c8ce635d19d582a5b98c /libc/tzcode | |
parent | 2c02d0057c93bfa6db4b30d8646baeb55d076062 (diff) | |
download | android_bionic-5204a9e8ca1ca7304db9998dcf3fc5a2d6087662.tar.gz android_bionic-5204a9e8ca1ca7304db9998dcf3fc5a2d6087662.tar.bz2 android_bionic-5204a9e8ca1ca7304db9998dcf3fc5a2d6087662.zip |
Fix most of the tzcode warnings.
There's one left, but that's not fixed upstream yet.
Change-Id: Iba920cb7b156357c7f5e8220eb55ff1637ff48a1
Diffstat (limited to 'libc/tzcode')
-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 c40569c47..0033652e9 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); |