Author: diego Date: Fri Aug 13 13:08:30 2010 New Revision: 31959 Log: Mark constant sws_spu_image() parameter as const, fixes the warning: spudec.c:874: warning: passing argument 2 of 'sws_scale' from incompatible pointer type Modified: trunk/spudec.c Modified: trunk/spudec.c ============================================================================== --- trunk/spudec.c Wed Aug 11 22:59:03 2010 (r31958) +++ trunk/spudec.c Fri Aug 13 13:08:30 2010 (r31959) @@ -852,8 +852,8 @@ static void scale_image(int x, int y, sc } static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, - int ds, unsigned char *s1, unsigned char *s2, int sw, - int sh, int ss) + int ds, const unsigned char* s1, unsigned char* s2, + int sw, int sh, int ss) { struct SwsContext *ctx; static SwsFilter filter;
On Fri, Aug 13, 2010 at 01:08:30PM +0200, diego wrote:
Author: diego Date: Fri Aug 13 13:08:30 2010 New Revision: 31959
Log: Mark constant sws_spu_image() parameter as const, fixes the warning: spudec.c:874: warning: passing argument 2 of 'sws_scale' from incompatible pointer type
Modified: trunk/spudec.c
Modified: trunk/spudec.c ============================================================================== --- trunk/spudec.c Wed Aug 11 22:59:03 2010 (r31958) +++ trunk/spudec.c Fri Aug 13 13:08:30 2010 (r31959) @@ -852,8 +852,8 @@ static void scale_image(int x, int y, sc }
static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, - int ds, unsigned char *s1, unsigned char *s2, int sw, - int sh, int ss) + int ds, const unsigned char* s1, unsigned char* s2, + int sw, int sh, int ss)
That looks inconsistent, why is s2 not const?
On Fri, Aug 13, 2010 at 01:39:18PM +0200, Reimar Döffinger wrote:
On Fri, Aug 13, 2010 at 01:08:30PM +0200, diego wrote:
Log: Mark constant sws_spu_image() parameter as const, fixes the warning: spudec.c:874: warning: passing argument 2 of 'sws_scale' from incompatible pointer type
--- trunk/spudec.c Wed Aug 11 22:59:03 2010 (r31958) +++ trunk/spudec.c Fri Aug 13 13:08:30 2010 (r31959) @@ -852,8 +852,8 @@ static void scale_image(int x, int y, sc
static void sws_spu_image(unsigned char *d1, unsigned char *d2, int dw, int dh, - int ds, unsigned char *s1, unsigned char *s2, int sw, - int sh, int ss) + int ds, const unsigned char* s1, unsigned char* s2, + int sw, int sh, int ss)
That looks inconsistent, why is s2 not const?
Because it is written to: spudec.c:875: error: assignment of read-only location '*(s2 + (unsigned int)i)' If you have a clean solution, I'm all ears... Diego
participants (3)
-
diego -
Diego Biurrun -
Reimar Döffinger