Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(782)

Unified Diff: src/codec/SkJpegCodec.cpp

Issue 2188313003: Revert of Silence -Wclobbered in each file that needs it. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/codec.gyp ('k') | src/codec/SkPngCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
« no previous file with comments | « gyp/codec.gyp ('k') | src/codec/SkPngCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698