diff options
author | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-02-09 07:55:10 +0900 |
---|---|---|
committer | Michihiro NAKAJIMA <ggcueroad@gmail.com> | 2012-02-09 07:55:10 +0900 |
commit | fc22f4a623faf980919b5bebc634b797e0d37644 (patch) | |
tree | bd85dca25e4ca4f0900f660ab7803ae1cac4cb8c /libarchive/archive_read_support_format_7zip.c | |
parent | 433f74b08f999c970b31ba36307bd05a77e0f135 (diff) | |
download | libarchive-fc22f4a623faf980919b5bebc634b797e0d37644.tar.gz |
Fix build failure with -Wshadow GCC option since it happend on FreeBSD current.
Diffstat (limited to 'libarchive/archive_read_support_format_7zip.c')
-rw-r--r-- | libarchive/archive_read_support_format_7zip.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/libarchive/archive_read_support_format_7zip.c b/libarchive/archive_read_support_format_7zip.c index ee0c1364..8f73ba9f 100644 --- a/libarchive/archive_read_support_format_7zip.c +++ b/libarchive/archive_read_support_format_7zip.c @@ -646,7 +646,6 @@ archive_read_format_7zip_read_header(struct archive_read *a, if ((zip_entry->mode & AE_IFMT) == AE_IFLNK) { unsigned char *symname = NULL; size_t symsize = 0; - int r; /* * Symbolic-name is recorded as its contents. We have to @@ -2532,17 +2531,17 @@ read_Header(struct archive_read *a, struct _7z_header_info *h, #define EPOC_TIME ARCHIVE_LITERAL_ULL(116444736000000000) static void -fileTimeToUtc(uint64_t fileTime, time_t *time, long *ns) +fileTimeToUtc(uint64_t fileTime, time_t *timep, long *ns) { if (fileTime >= EPOC_TIME) { fileTime -= EPOC_TIME; /* milli seconds base */ - *time = (time_t)(fileTime / 10000000); + *timep = (time_t)(fileTime / 10000000); /* nano seconds base */ *ns = (long)(fileTime % 10000000) * 100; } else { - *time = 0; + *timep = 0; *ns = 0; } } @@ -3521,16 +3520,16 @@ x86_Convert(struct _7zip *zip, uint8_t *data, size_t size) uint32_t dest; for (;;) { uint8_t b; - int index; + int b_index; dest = src - (ip + (uint32_t)bufferPos); if (prevMask == 0) break; - index = kMaskToBitNumber[prevMask] * 8; - b = (uint8_t)(dest >> (24 - index)); + b_index = kMaskToBitNumber[prevMask] * 8; + b = (uint8_t)(dest >> (24 - b_index)); if (!Test86MSByte(b)) break; - src = dest ^ ((1 << (32 - index)) - 1); + src = dest ^ ((1 << (32 - b_index)) - 1); } p[4] = (uint8_t)(~(((dest >> 24) & 1) - 1)); p[3] = (uint8_t)(dest >> 16); @@ -3571,7 +3570,7 @@ x86_Convert(struct _7zip *zip, uint8_t *data, size_t size) #define RC_READ_BYTE (*buffer++) #define RC_TEST { if (buffer == bufferLim) return SZ_ERROR_DATA; } #define RC_INIT2 zip->bcj2_code = 0; zip->bcj2_range = 0xFFFFFFFF; \ - { int i; for (i = 0; i < 5; i++) { RC_TEST; zip->bcj2_code = (zip->bcj2_code << 8) | RC_READ_BYTE; }} + { int ii; for (ii = 0; ii < 5; ii++) { RC_TEST; zip->bcj2_code = (zip->bcj2_code << 8) | RC_READ_BYTE; }} #define NORMALIZE if (zip->bcj2_range < kTopValue) { RC_TEST; zip->bcj2_range <<= 8; zip->bcj2_code = (zip->bcj2_code << 8) | RC_READ_BYTE; } @@ -3637,14 +3636,14 @@ Bcj2_Decode(struct _7zip *zip, uint8_t *outBuf, size_t outSize) if (zip->bcj_state == 1) { while (limit != 0) { - uint8_t b = buf0[inPos]; - outBuf[outPos++] = b; - if (IsJ(zip->bcj2_prevByte, b)) { + uint8_t bb = buf0[inPos]; + outBuf[outPos++] = bb; + if (IsJ(zip->bcj2_prevByte, bb)) { zip->bcj_state = 2; break; } inPos++; - zip->bcj2_prevByte = b; + zip->bcj2_prevByte = bb; limit--; } } |