summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshish Kulkarni <kulkarni.ashish@gmail.com>2014-12-18 20:58:23 +0530
committerAshish Kulkarni <kulkarni.ashish@gmail.com>2015-01-08 17:51:33 +0100
commitca1d4ca82d3eff0d1cbc645bb21da5e709c1ad57 (patch)
treec498e69c68d4dea925602e296f97e3c759d57fd7
parentfe1706e797033af0411ce0db793f51c90078d21e (diff)
fix build on MSVC with --system-libpng or --system-libjpeg
This was introduced in WebKit r108792, as in the related bug https://bugs.webkit.org/show_bug.cgi?id=32410#c26 it was confirmed as broken for Windows MSVC (for Chromium). The final merge made it conditional for PLATFORM(QT) but did not fix the underlying issue, which was the wrong placement of NO_RETURN as MSVC does not allow __declspec(noreturn) to be put after the declaration but GCC allows __attribute((__noreturn__)) at either location. This is similar with the usage of NO_RETURN in other places. Change-Id: I95ae3727553093b84b3645eb6dad63779f08e09d Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
-rw-r--r--Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp6
-rw-r--r--Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp4
2 files changed, 2 insertions, 8 deletions
diff --git a/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index d15dce2da..7da75c874 100644
--- a/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/Source/WebCore/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -104,11 +104,7 @@ void init_source(j_decompress_ptr jd);
boolean fill_input_buffer(j_decompress_ptr jd);
void skip_input_data(j_decompress_ptr jd, long num_bytes);
void term_source(j_decompress_ptr jd);
-#if PLATFORM(QT)
-void error_exit(j_common_ptr) NO_RETURN;
-#else
-void error_exit(j_common_ptr cinfo);
-#endif
+NO_RETURN void error_exit(j_common_ptr cinfo);
// Implementation of a JPEG src object that understands our state machine
struct decoder_source_mgr {
diff --git a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
index 776acce2b..b17d681f9 100644
--- a/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
+++ b/Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
@@ -67,9 +67,7 @@ const double cInverseGamma = 0.45455;
const unsigned long cMaxPNGSize = 1000000UL;
// Called if the decoding of the image fails.
-#if PLATFORM(QT)
-static void PNGAPI decodingFailed(png_structp, png_const_charp) NO_RETURN;
-#endif
+static NO_RETURN void PNGAPI decodingFailed(png_structp, png_const_charp);
static void PNGAPI decodingFailed(png_structp png, png_const_charp)
{
longjmp(JMPBUF(png), 1);