jpeg compressor: fix VC++ warning C4703

This commit fixes VC++ warning C4703 in jpeg-compressor/jpgd.cpp
"potentially uninitialized local pointer variable".
This commit is contained in:
Rasmus Christian Pedersen
2014-05-08 20:09:57 +02:00
parent abd062a700
commit 15aa210468
+2 -1
View File
@@ -2,6 +2,7 @@
// Public domain, Rich Geldreich <richgel99@gmail.com>
// 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)
{