remove some warnings:

* "declaration of ‘index’ shadows a global declaration [-Wshadow]"
* "signed and unsigned type in conditional expression [-Wsign-compare]"

Change-Id: I891182d919b18b6c84048486e0385027bd93b57d
This commit is contained in:
skal 2013-05-14 22:28:32 +02:00
parent ba8f74e229
commit 87a4fca25f
2 changed files with 6 additions and 5 deletions

View File

@ -1063,7 +1063,8 @@ static int AllocateInternalBuffers(VP8LDecoder* const dec, int final_width,
const uint64_t num_pixels = (uint64_t)dec->width_ * dec->height_; const uint64_t num_pixels = (uint64_t)dec->width_ * dec->height_;
// Scratch buffer corresponding to top-prediction row for transforming the // Scratch buffer corresponding to top-prediction row for transforming the
// first row in the row-blocks. Not needed for paletted alpha. // first row in the row-blocks. Not needed for paletted alpha.
const uint64_t cache_top_pixels = argb_cache_needed ? final_width : 0ULL; const uint64_t cache_top_pixels =
argb_cache_needed ? (uint16_t)final_width : 0ULL;
// Scratch buffer for temporary BGRA storage. Not needed for paletted alpha. // Scratch buffer for temporary BGRA storage. Not needed for paletted alpha.
const uint64_t cache_pixels = const uint64_t cache_pixels =
argb_cache_needed ? (uint64_t)final_width * NUM_ARGB_CACHE_ROWS : 0ULL; argb_cache_needed ? (uint64_t)final_width * NUM_ARGB_CACHE_ROWS : 0ULL;

View File

@ -1128,12 +1128,12 @@ void FUNC_NAME(const VP8LTransform* const transform, \
} \ } \
} }
static WEBP_INLINE uint32_t GetARGBIndex(uint32_t index) { static WEBP_INLINE uint32_t GetARGBIndex(uint32_t idx) {
return (index >> 8) & 0xff; return (idx >> 8) & 0xff;
} }
static WEBP_INLINE uint8_t GetAlphaIndex(uint8_t index) { static WEBP_INLINE uint8_t GetAlphaIndex(uint8_t idx) {
return index; return idx;
} }
static WEBP_INLINE uint32_t GetARGBValue(uint32_t val) { static WEBP_INLINE uint32_t GetARGBValue(uint32_t val) {