From 15aa210468fe93c41b9da4557546f63523b627dd Mon Sep 17 00:00:00 2001 From: Rasmus Christian Pedersen Date: Thu, 8 May 2014 20:09:57 +0200 Subject: [PATCH] jpeg compressor: fix VC++ warning C4703 This commit fixes VC++ warning C4703 in jpeg-compressor/jpgd.cpp "potentially uninitialized local pointer variable". --- renderdoc/3rdparty/jpeg-compressor/jpgd.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp b/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp index fad9a37a9..8c6b5ca56 100644 --- a/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp +++ b/renderdoc/3rdparty/jpeg-compressor/jpgd.cpp @@ -2,6 +2,7 @@ // Public domain, Rich Geldreich // Alex Evans: Linear memory allocator (taken from jpge.h). // v1.04, May. 19, 2012: Code tweaks to fix VS2008 static code analysis warnings (all looked harmless) +// changes from upstream, May. 5 2014: Fix harmless VC++ warning C4703 // // Supports progressive and baseline sequential JPEG image files, and the most common chroma subsampling factors: Y, H1V1, H2V1, H1V2, and H2V2. // @@ -3088,7 +3089,7 @@ unsigned char *decompress_jpeg_image_from_stream(jpeg_decoder_stream *pStream, i for (int y = 0; y < image_height; y++) { - const uint8* pScan_line; + const uint8* pScan_line = NULL; uint scan_line_len; if (decoder.decode((const void**)&pScan_line, &scan_line_len) != JPGD_SUCCESS) {