[FFmpeg-cvslog] swscale-test: const correctness for pointer variable

Diego Biurrun git at videolan.org
Fri May 19 12:23:13 EEST 2017


ffmpeg | branch: master | Diego Biurrun <diego at biurrun.de> | Sun Dec  6 12:45:10 2015 +0100| [5c0e2b13eb79b455b15355d64f7993b0f66ea9ec] | committer: Diego Biurrun

swscale-test: const correctness for pointer variable

libswscale/swscale-test.c:369:20: warning: passing argument 2 of ‘sws_scale’ from incompatible pointer type [-Wincompatible-pointer-types]
libswscale/swscale.h:207:5: note: expected ‘const uint8_t * const* {aka const unsigned char * const*}’ but argument is of type ‘uint8_t ** {aka unsigned char **}’

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5c0e2b13eb79b455b15355d64f7993b0f66ea9ec
---

 libswscale/tests/swscale.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c
index 853a8a7231..364e2a75eb 100644
--- a/libswscale/tests/swscale.c
+++ b/libswscale/tests/swscale.c
@@ -345,7 +345,7 @@ int main(int argc, char **argv)
     enum AVPixelFormat srcFormat = AV_PIX_FMT_NONE;
     enum AVPixelFormat dstFormat = AV_PIX_FMT_NONE;
     uint8_t *rgb_data   = av_malloc(W * H * 4);
-    uint8_t *rgb_src[4] = { rgb_data, NULL, NULL, NULL };
+    const uint8_t *rgb_src[4] = { rgb_data, NULL, NULL, NULL };
     int rgb_stride[4]   = { 4 * W, 0, 0, 0 };
     uint8_t *data       = av_malloc(4 * W * H);
     uint8_t *src[4]     = { data, data + W * H, data + W * H * 2, data + W * H * 3 };



More information about the ffmpeg-cvslog mailing list