OSDN Git Service

Fix warnings and set Werror flag to not let them happen again.
[android-x86/packages-apps-Gallery2.git] / jni_jpegstream / src / jpeg_reader.cpp
index 4726b64..9662152 100644 (file)
@@ -215,7 +215,6 @@ void JpegReader::formatPixels(uint8_t* buf, int32_t len) {
     // Do endianness and alpha for output format
     if (mFormat == Jpeg_Config::FORMAT_RGBA) {
         // Set alphas to 255
-        uint8_t* end = buf + len - 1;
         for (int i = len - 1; i >= 0; i -= 4) {
             buf[i] = 255;
             buf[i - 1] = *--iter;
@@ -224,7 +223,6 @@ void JpegReader::formatPixels(uint8_t* buf, int32_t len) {
         }
     } else if (mFormat == Jpeg_Config::FORMAT_ABGR) {
         // Reverse endianness and set alphas to 255
-        uint8_t* end = buf + len - 1;
         int r, g, b;
         for (int i = len - 1; i >= 0; i -= 4) {
             b = *--iter;