Add a const qualifier in a cast, fix the gcc warning:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>
Sun, 17 Jan 2010 00:21:50 +0000 (00:21 +0000)
committerStefano Sabatini <stefano.sabatini-lala@poste.it>
Sun, 17 Jan 2010 00:21:50 +0000 (00:21 +0000)
swscale.c: In function ‘planarCopy’:
swscale.c:2256: warning: cast discards qualifiers from pointer target type

Originally committed as revision 30340 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale.c

index d256f10..0b12b5e 100644 (file)
@@ -2253,7 +2253,7 @@ static int planarCopy(SwsContext *c, const uint8_t* src[], int srcStride[], int
 
                 for (i=0; i<height; i++) {
                     for (j=0; j<length; j++)
-                        ((uint16_t*)dstPtr)[j] = bswap_16(((uint16_t*)srcPtr)[j]);
+                        ((uint16_t*)dstPtr)[j] = bswap_16(((const uint16_t*)srcPtr)[j]);
                     srcPtr+= srcStride[plane];
                     dstPtr+= dstStride[plane];
                 }