Buglet in gdk-pixbuf



Hija,

I found a problem that looks pretty odd to me but I also
have trouble understanding what the function is supposed
to do so please help if you can.

In 
static void
rgb888amsb (GdkImage    *image,
            guchar      *pixels,
            int          rowstride,
            int          x1,
            int          y1,
            int          x2,
            int          y2,
            GdkColormap *colormap)
which can be found in gdk/gdkpixbuf-drawable.c:1102

there's a line (1147)
 *o++ = (*s << 8) | 0xff; /* untested */
which gives the compiler warning:
gdkpixbuf-drawable.c:1147: warning: overflow in implicit constant conversion

which is obviously correct since both o and s are guint8's. Also what
value would one expect from left-shifting a guint8 value by 8 and then 
or-ing with 0xff except than 0xff? 
Could it be that o and s are supposed to be an guint32 thusly working on
the full RGBA at once by left-shifting all by one component and setting
A to 255?

--
Servus,
       Daniel




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]