Fix some compilation warnings

Cast to guint8* and use guint instead int in some variables
This commit is contained in:
Javier Jardón
2009-11-03 00:04:49 +01:00
parent 1a02671437
commit 8dfac859a1

View File

@ -154,7 +154,7 @@ rgb1 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int bpl; int bpl;
register guint8 data; register guint8 data;
guint8 *o; guint8 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
d (printf ("1 bits/pixel\n")); d (printf ("1 bits/pixel\n"));
@ -191,7 +191,7 @@ rgb1a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int bpl; int bpl;
register guint8 data; register guint8 data;
guint8 *o; guint8 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint32 remap[2]; guint32 remap[2];
d (printf ("1 bits/pixel\n")); d (printf ("1 bits/pixel\n"));
@ -241,7 +241,7 @@ rgb8 (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
int bpl; int bpl;
guint32 mask; guint32 mask;
register guint32 data; register guint32 data;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
register guint8 *s; register guint8 *s;
register guint8 *o; register guint8 *o;
@ -282,7 +282,7 @@ rgb8a (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap)
guint32 remap[256]; guint32 remap[256];
register guint8 *s; /* read 2 pixels at once */ register guint8 *s; /* read 2 pixels at once */
register guint32 *o; register guint32 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -336,7 +336,7 @@ rgb565lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint8 *s; /* read 2 pixels at once */ register guint8 *s; /* read 2 pixels at once */
#endif #endif
register guint16 *o; register guint16 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -407,7 +407,7 @@ rgb565msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint32 *s; /* read 2 pixels at once */ register guint32 *s; /* read 2 pixels at once */
#endif #endif
register guint16 *o; register guint16 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -479,7 +479,7 @@ rgb565alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif #endif
register guint32 *o; register guint32 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -536,7 +536,7 @@ rgb565amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif #endif
register guint32 *o; register guint32 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -592,7 +592,7 @@ rgb555lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint8 *s; /* read 2 pixels at once */ register guint8 *s; /* read 2 pixels at once */
#endif #endif
register guint16 *o; register guint16 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -663,7 +663,7 @@ rgb555msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
register guint32 *s; /* read 2 pixels at once */ register guint32 *s; /* read 2 pixels at once */
#endif #endif
register guint16 *o; register guint16 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -735,7 +735,7 @@ rgb555alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif #endif
register guint32 *o; register guint32 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -792,7 +792,7 @@ rgb555amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
#endif #endif
register guint32 *o; register guint32 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -840,7 +840,7 @@ rgb888alsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
guint8 *s; /* for byte order swapping */ guint8 *s; /* for byte order swapping */
guint8 *o; guint8 *o;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
width = image->width; width = image->width;
height = image->height; height = image->height;
@ -871,7 +871,7 @@ rgb888lsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
int width, height; int width, height;
int bpl; int bpl;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *o, *s; guint8 *o, *s;
width = image->width; width = image->width;
@ -901,7 +901,7 @@ rgb888amsb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colorma
int width, height; int width, height;
int bpl; int bpl;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
#ifdef LITTLE #ifdef LITTLE
guint32 *o; guint32 *o;
guint32 *s; guint32 *s;
@ -949,7 +949,7 @@ rgb888msb (XImage *image, guchar *pixels, int rowstride, xlib_colormap *colormap
int width, height; int width, height;
int bpl; int bpl;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *s; guint8 *s;
guint8 *o; guint8 *o;
@ -983,7 +983,7 @@ convert_real_slow (XImage *image, guchar *pixels, int rowstride, xlib_colormap *
int xx, yy; int xx, yy;
int width, height; int width, height;
int bpl; int bpl;
guint8 *srow = image->data, *orow = pixels; guint8 *srow = (guint8 *)image->data, *orow = pixels;
guint8 *o; guint8 *o;
guint32 pixel; guint32 pixel;
Visual *v; Visual *v;
@ -1134,7 +1134,7 @@ xlib_window_is_viewable (Window w)
while (w != 0) { while (w != 0) {
Window parent, root, *children; Window parent, root, *children;
int nchildren; guint nchildren;
XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa); XGetWindowAttributes (gdk_pixbuf_dpy, w, &wa);
if (wa.map_state != IsViewable) if (wa.map_state != IsViewable)
@ -1223,7 +1223,7 @@ gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
int dest_x, int dest_y, int dest_x, int dest_y,
int width, int height) int width, int height)
{ {
int src_width, src_height; guint src_width, src_height;
XImage *image; XImage *image;
int rowstride, bpp, alpha; int rowstride, bpp, alpha;
XWindowAttributes wa; XWindowAttributes wa;
@ -1260,7 +1260,8 @@ gdk_pixbuf_xlib_get_from_drawable (GdkPixbuf *dest,
src_height = wa.height; src_height = wa.height;
} else { } else {
Window root; Window root;
int tx, ty, bwidth, depth; int tx, ty;
guint bwidth, depth;
XGetGeometry (gdk_pixbuf_dpy, src, &root, &tx, &ty, XGetGeometry (gdk_pixbuf_dpy, src, &root, &tx, &ty,
&src_width, &src_height, &bwidth, &depth); &src_width, &src_height, &bwidth, &depth);
} }