[SCM] libav/experimental: Add some explicit casts to avoid "assignment from incompatible pointer type" warnings

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:54:31 UTC 2013


The following commit has been merged in the experimental branch:
commit 628bc5e8623e35d3a69d235eae8519fccdaea50b
Author: Luca Abeni <lucabe72 at email.it>
Date:   Tue Dec 26 17:41:38 2006 +0000

    Add some explicit casts to avoid "assignment from incompatible pointer type"
    warnings
    
    Originally committed as revision 21774 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index 360f033..00d2168 100644
--- a/libswscale/swscale.c
+++ b/libswscale/swscale.c
@@ -417,9 +417,9 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil
                         
 #define YSCALE_YUV_2_RGBX_C(type) \
 			YSCALE_YUV_2_PACKEDX_C(type)\
-			r = c->table_rV[V];\
-			g = c->table_gU[U] + c->table_gV[V];\
-			b = c->table_bU[U];\
+			r = (type *)c->table_rV[V];\
+			g = (type *)(c->table_gU[U] + c->table_gV[V]);\
+			b = (type *)c->table_bU[U];\
 
 #define YSCALE_YUV_2_PACKED2_C \
 		for(i=0; i<(dstW>>1); i++){\
@@ -432,9 +432,9 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil
 #define YSCALE_YUV_2_RGB2_C(type) \
 			YSCALE_YUV_2_PACKED2_C\
 			type *r, *b, *g;\
-			r = c->table_rV[V];\
-			g = c->table_gU[U] + c->table_gV[V];\
-			b = c->table_bU[U];\
+			r = (type *)c->table_rV[V];\
+			g = (type *)(c->table_gU[U] + c->table_gV[V]);\
+			b = (type *)c->table_bU[U];\
 
 #define YSCALE_YUV_2_PACKED1_C \
 		for(i=0; i<(dstW>>1); i++){\
@@ -447,9 +447,9 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil
 #define YSCALE_YUV_2_RGB1_C(type) \
 			YSCALE_YUV_2_PACKED1_C\
 			type *r, *b, *g;\
-			r = c->table_rV[V];\
-			g = c->table_gU[U] + c->table_gV[V];\
-			b = c->table_bU[U];\
+			r = (type *)c->table_rV[V];\
+			g = (type *)(c->table_gU[U] + c->table_gV[V]);\
+			b = (type *)c->table_bU[U];\
 
 #define YSCALE_YUV_2_PACKED1B_C \
 		for(i=0; i<(dstW>>1); i++){\
@@ -462,9 +462,9 @@ static inline void yuv2nv12XinC(int16_t *lumFilter, int16_t **lumSrc, int lumFil
 #define YSCALE_YUV_2_RGB1B_C(type) \
 			YSCALE_YUV_2_PACKED1B_C\
 			type *r, *b, *g;\
-			r = c->table_rV[V];\
-			g = c->table_gU[U] + c->table_gV[V];\
-			b = c->table_bU[U];\
+			r = (type *)c->table_rV[V];\
+			g = (type *)(c->table_gU[U] + c->table_gV[V]);\
+			b = (type *)c->table_bU[U];\
 
 #define YSCALE_YUV_2_ANYRGB_C(func, func2)\
 	switch(c->dstFormat)\
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 55c4bb2..645328c 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -213,9 +213,9 @@ const int32_t Inverse_Table_6_9[8][4] = {
 #define RGB(i)					\
 	U = pu[i];				\
 	V = pv[i];				\
-	r = c->table_rV[V];			\
-	g = c->table_gU[U] + c->table_gV[V];		\
-	b = c->table_bU[U];
+	r = (void *)c->table_rV[V];			\
+	g = (void *)(c->table_gU[U] + c->table_gV[V]);		\
+	b = (void *)c->table_bU[U];
 
 #define DST1(i)					\
 	Y = py_1[2*i];				\

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list