diff --git a/ChangeLog b/ChangeLog index b84fefda5..22270a848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-06-30 Emmanuele Bassi + + Bug 980 - cogl-bitmap-fallback.c compiler error/warning due to + cast issue (Haakon Sporsheim) + + * clutter/cogl/common/cogl-bitmap-fallback.c: + (_cogl_unpremult_alpha_last), + (_cogl_unpremult_alpha_first): Cast to avoid a compiler warning + with MSC. + 2008-06-30 Chris Lord * tests/test-shader.c: (main): diff --git a/clutter/cogl/common/cogl-bitmap-fallback.c b/clutter/cogl/common/cogl-bitmap-fallback.c index 21a558460..cb9b9040c 100644 --- a/clutter/cogl/common/cogl-bitmap-fallback.c +++ b/clutter/cogl/common/cogl-bitmap-fallback.c @@ -165,9 +165,9 @@ _cogl_unpremult_alpha_last (const guchar *src, guchar *dst) { guchar alpha = src[3]; - dst[0] = (((src[0] >> 16) & 0xff) * 255 ) / alpha; - dst[1] = (((src[1] >> 8) & 0xff) * 255 ) / alpha; - dst[2] = (((src[2] >> 0) & 0xff) * 255 ) / alpha; + dst[0] = ((((gulong) src[0] >> 16) & 0xff) * 255 ) / alpha; + dst[1] = ((((gulong) src[1] >> 8) & 0xff) * 255 ) / alpha; + dst[2] = ((((gulong) src[2] >> 0) & 0xff) * 255 ) / alpha; dst[3] = alpha; } @@ -177,9 +177,9 @@ _cogl_unpremult_alpha_first (const guchar *src, guchar *dst) guchar alpha = src[0]; dst[0] = alpha; - dst[1] = (((src[1] >> 16) & 0xff) * 255 ) / alpha; - dst[2] = (((src[2] >> 8) & 0xff) * 255 ) / alpha; - dst[3] = (((src[3] >> 0) & 0xff) * 255 ) / alpha; + dst[1] = ((((gulong) src[1] >> 16) & 0xff) * 255 ) / alpha; + dst[2] = ((((gulong) src[2] >> 8) & 0xff) * 255 ) / alpha; + dst[3] = ((((gulong) src[3] >> 0) & 0xff) * 255 ) / alpha; } gboolean