From f0e0677b87b22006964a17ee1e8947f5b72ebb25 Mon Sep 17 00:00:00 2001 From: James Zern Date: Fri, 16 Jan 2015 17:48:51 -0800 Subject: [PATCH] VP8LEncodeStream: add an assert check enc->argb_ to quiet an msvs /analyze warning: C6387: 'enc->argb_+y*width' could be '0': this does not adhere to the specification for the function 'memcpy'. Change-Id: I87544e92ee0d3ea38942a475c30c6d552f9877b7 --- src/enc/vp8l.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/enc/vp8l.c b/src/enc/vp8l.c index 60f13ca0..ca251707 100644 --- a/src/enc/vp8l.c +++ b/src/enc/vp8l.c @@ -1257,6 +1257,7 @@ WebPEncodingError VP8LEncodeStream(const WebPConfig* const config, int y; err = AllocateTransformBuffer(enc, width, height); if (err != VP8_ENC_OK) goto Error; + assert(enc->argb_ != NULL); for (y = 0; y < height; ++y) { memcpy(enc->argb_ + y * width, picture->argb + y * picture->argb_stride,