| Index: src/codec/SkJpegCodec.cpp
|
| diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
|
| index 6a1636c3cf7ef23b5ad6ddde517c80d035a5e6ec..f4116e324f82ca4e584e9080362735469abde463 100644
|
| --- a/src/codec/SkJpegCodec.cpp
|
| +++ b/src/codec/SkJpegCodec.cpp
|
| @@ -18,12 +18,6 @@
|
| // stdio is needed for libjpeg-turbo
|
| #include <stdio.h>
|
| #include "SkJpegUtility.h"
|
| -
|
| -// Same as setjmp, but introduces a new empty scope.
|
| -// This way we can avoid GCC's overactive warnings about clobbered locals.
|
| -static int setjmp_no_locals(jmp_buf env) {
|
| - return setjmp(env);
|
| -}
|
|
|
| extern "C" {
|
| #include "jerror.h"
|
| @@ -196,7 +190,7 @@
|
| SkAutoTDelete<JpegDecoderMgr> decoderMgr(new JpegDecoderMgr(stream));
|
|
|
| // libjpeg errors will be caught and reported here
|
| - if (setjmp_no_locals(decoderMgr->getJmpBuf())) {
|
| + if (setjmp(decoderMgr->getJmpBuf())) {
|
| return decoderMgr->returnFalse("setjmp");
|
| }
|
|
|
| @@ -420,7 +414,7 @@
|
| * dimensions if possible
|
| */
|
| bool SkJpegCodec::onDimensionsSupported(const SkISize& size) {
|
| - if (setjmp_no_locals(fDecoderMgr->getJmpBuf())) {
|
| + if (setjmp(fDecoderMgr->getJmpBuf())) {
|
| return fDecoderMgr->returnFalse("onDimensionsSupported/setjmp");
|
| }
|
|
|
| @@ -472,7 +466,7 @@
|
| jpeg_decompress_struct* dinfo = fDecoderMgr->dinfo();
|
|
|
| // Set the jump location for libjpeg errors
|
| - if (setjmp_no_locals(fDecoderMgr->getJmpBuf())) {
|
| + if (setjmp(fDecoderMgr->getJmpBuf())) {
|
| return fDecoderMgr->returnFailure("setjmp", kInvalidInput);
|
| }
|
|
|
| @@ -581,7 +575,7 @@
|
| SkCodec::Result SkJpegCodec::onStartScanlineDecode(const SkImageInfo& dstInfo,
|
| const Options& options, SkPMColor ctable[], int* ctableCount) {
|
| // Set the jump location for libjpeg errors
|
| - if (setjmp_no_locals(fDecoderMgr->getJmpBuf())) {
|
| + if (setjmp(fDecoderMgr->getJmpBuf())) {
|
| SkCodecPrintf("setjmp: Error from libjpeg\n");
|
| return kInvalidInput;
|
| }
|
| @@ -657,7 +651,7 @@
|
|
|
| int SkJpegCodec::onGetScanlines(void* dst, int count, size_t dstRowBytes) {
|
| // Set the jump location for libjpeg errors
|
| - if (setjmp_no_locals(fDecoderMgr->getJmpBuf())) {
|
| + if (setjmp(fDecoderMgr->getJmpBuf())) {
|
| return fDecoderMgr->returnFailure("setjmp", kInvalidInput);
|
| }
|
| // Read rows one at a time
|
| @@ -694,7 +688,7 @@
|
|
|
| bool SkJpegCodec::onSkipScanlines(int count) {
|
| // Set the jump location for libjpeg errors
|
| - if (setjmp_no_locals(fDecoderMgr->getJmpBuf())) {
|
| + if (setjmp(fDecoderMgr->getJmpBuf())) {
|
| return fDecoderMgr->returnFalse("setjmp");
|
| }
|
|
|
| @@ -809,7 +803,7 @@
|
| }
|
|
|
| // Set the jump location for libjpeg errors
|
| - if (setjmp_no_locals(fDecoderMgr->getJmpBuf())) {
|
| + if (setjmp(fDecoderMgr->getJmpBuf())) {
|
| return fDecoderMgr->returnFailure("setjmp", kInvalidInput);
|
| }
|
|
|
|
|