summaryrefslogtreecommitdiff
path: root/riscos/jpeg.c
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2003-12-27 00:11:57 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2003-12-27 00:11:57 +0000
commit59fb052818656e74162d7f026f7089ec42c1e8a0 (patch)
treee5b8bf21e2201adf5170f2bfde49ae4423902f63 /riscos/jpeg.c
parent2363d8f5af7302924a0ce3608d971f5594710f3f (diff)
downloadnetsurf-59fb052818656e74162d7f026f7089ec42c1e8a0.tar.gz
netsurf-59fb052818656e74162d7f026f7089ec42c1e8a0.tar.bz2
[project @ 2003-12-27 00:11:57 by jmb]
Tidy code to reduce compiler warnings. htmlredraw.c and plugin.c produce the most now. Hopefully I haven't broken anything ;) svn path=/import/netsurf/; revision=451
Diffstat (limited to 'riscos/jpeg.c')
-rw-r--r--riscos/jpeg.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/riscos/jpeg.c b/riscos/jpeg.c
index 842480878..b1f62c169 100644
--- a/riscos/jpeg.c
+++ b/riscos/jpeg.c
@@ -29,7 +29,7 @@ void jpeg_create(struct content *c)
void jpeg_process_data(struct content *c, char *data, unsigned long size)
{
c->data.jpeg.data = xrealloc(c->data.jpeg.data, c->data.jpeg.length + size);
- memcpy(c->data.jpeg.data + c->data.jpeg.length, data, size);
+ memcpy((char*)(c->data.jpeg.data) + c->data.jpeg.length, data, size);
c->data.jpeg.length += size;
c->size += size;
}
@@ -39,8 +39,9 @@ int jpeg_convert(struct content *c, unsigned int width, unsigned int height)
{
os_error *error;
int w, h;
- error = xjpeginfo_dimensions(c->data.jpeg.data, (int) c->data.jpeg.length,
- 0, &w, &h, 0, 0, 0);
+ error = xjpeginfo_dimensions((jpeg_image const*)c->data.jpeg.data,
+ (int) c->data.jpeg.length,
+ 0, &w, &h, 0, 0, 0);
if (error != 0)
return 1;
c->width = w;
@@ -80,7 +81,7 @@ void jpeg_redraw(struct content *c, long x, long y,
factors.ydiv = c->height * 2;
xjpeg_plot_scaled((jpeg_image *) c->data.jpeg.data,
- x, y - height,
+ x, (int)(y - height),
&factors, (int) c->data.jpeg.length,
jpeg_SCALE_DITHERED);
}