diff options
Diffstat (limited to 'frontends/gtk/gdk.c')
-rw-r--r-- | frontends/gtk/gdk.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/frontends/gtk/gdk.c b/frontends/gtk/gdk.c index fd82af5b2..fe9a0791c 100644 --- a/frontends/gtk/gdk.c +++ b/frontends/gtk/gdk.c @@ -33,7 +33,8 @@ convert_alpha(guchar *dest_data, int x, y; for (y = 0; y < height; y++) { - guint32 *src = (guint32 *) src_data; + /* this cast is safe, the buffer is appropriately aligned */ + guint32 *src = (void *) src_data; for (x = 0; x < width; x++) { guint alpha = src[x] >> 24; @@ -72,7 +73,7 @@ nsgdk_pixbuf_get_from_surface(cairo_surface_t *surface, int scwidth, int scheigh memset(gdk_pixbuf_get_pixels(pixbuf), 0xff, - gdk_pixbuf_get_rowstride(pixbuf) * scheight); + gdk_pixbuf_get_rowstride(pixbuf) * (size_t)scheight); /* scale cairo surface into new surface the target size */ cairo_surface_flush(surface); /* ensure source surface is ready */ |