From 8112c8cf544a261cc89d54e91cad95d44c2486bb Mon Sep 17 00:00:00 2001 From: skal Date: Tue, 14 May 2013 22:28:32 +0200 Subject: [PATCH] remove some warnings: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * "declaration of ‘index’ shadows a global declaration [-Wshadow]" * "signed and unsigned type in conditional expression [-Wsign-compare]" Change-Id: I891182d919b18b6c84048486e0385027bd93b57d (cherry picked from commit 87a4fca25f6ead8a244003d63ccb0d0b4529dc55) --- src/dec/vp8l.c | 3 ++- src/dsp/lossless.c | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/dec/vp8l.c b/src/dec/vp8l.c index 19858822..395b36d7 100644 --- a/src/dec/vp8l.c +++ b/src/dec/vp8l.c @@ -1063,7 +1063,8 @@ static int AllocateInternalBuffers(VP8LDecoder* const dec, int final_width, const uint64_t num_pixels = (uint64_t)dec->width_ * dec->height_; // Scratch buffer corresponding to top-prediction row for transforming the // 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. const uint64_t cache_pixels = argb_cache_needed ? (uint64_t)final_width * NUM_ARGB_CACHE_ROWS : 0ULL; diff --git a/src/dsp/lossless.c b/src/dsp/lossless.c index 1060cbd3..8c0960ad 100644 --- a/src/dsp/lossless.c +++ b/src/dsp/lossless.c @@ -1128,12 +1128,12 @@ void FUNC_NAME(const VP8LTransform* const transform, \ } \ } -static WEBP_INLINE uint32_t GetARGBIndex(uint32_t index) { - return (index >> 8) & 0xff; +static WEBP_INLINE uint32_t GetARGBIndex(uint32_t idx) { + return (idx >> 8) & 0xff; } -static WEBP_INLINE uint8_t GetAlphaIndex(uint8_t index) { - return index; +static WEBP_INLINE uint8_t GetAlphaIndex(uint8_t idx) { + return idx; } static WEBP_INLINE uint32_t GetARGBValue(uint32_t val) {