r5359 tlsa - /trunk/netsurf/riscos/bitmap.c

netsurf at semichrome.net netsurf at semichrome.net
Tue Sep 16 23:14:40 BST 2008


Author: tlsa
Date: Tue Sep 16 17:14:39 2008
New Revision: 5359

URL: http://source.netsurf-browser.org?rev=5359&view=rev
Log:
Fix some wrarnings.

Modified:
    trunk/netsurf/riscos/bitmap.c

Modified: trunk/netsurf/riscos/bitmap.c
URL: http://source.netsurf-browser.org/trunk/netsurf/riscos/bitmap.c?rev=5359&r1=5358&r2=5359&view=diff
==============================================================================
--- trunk/netsurf/riscos/bitmap.c (original)
+++ trunk/netsurf/riscos/bitmap.c Tue Sep 16 17:14:39 2008
@@ -306,7 +306,7 @@
 
 	dp_offset = bitmap_get_rowstride(bitmap) / 4;
 
-	dp = bitmap_get_buffer(bitmap);
+	dp = (void*)bitmap_get_buffer(bitmap);
 	if (!dp)
 		return;
 	sp = (byte*)s + s->image;
@@ -326,11 +326,10 @@
 	}
 
 	/* (partially-)transparent pixels in the overlayed sprite retain
-	   their transparency in the output bitmap; opaque sprite pixels
-	   are also propagated to the bitmap, except those which are the
-	   OVERLAY_INDEX colour which allow the original bitmap contents to
-	   show through */
-
+	 * their transparency in the output bitmap; opaque sprite pixels
+	 * are also propagated to the bitmap, except those which are the
+	 * OVERLAY_INDEX colour which allow the original bitmap contents to
+	 * show through */
 	for (y = 0; y < h; y++) {
 		unsigned *sdp = dp;
 		for(x = 0; x < w; x++) {
@@ -441,10 +440,10 @@
 		(osspriteop_header *) (bitmap->sprite_area + 1);
 	unsigned int height = (sprite_header->height + 1);
 	unsigned int size = width * height;
-	unsigned *p = (unsigned*)sprite;
+	unsigned *p = (void*)sprite;
 	unsigned *ep;
 
-	ep = (unsigned*)(sprite + (size & ~31));
+	ep = (void*)(sprite + (size & ~31));
 	while (p < ep) {
 		/* \todo prefetch(p, 128)? */
 		if (((p[0] & p[1] & p[2] & p[3] & p[4] & p[5] & p[6] & p[7])
@@ -609,7 +608,7 @@
 
 	if (bitmap_get_opaque(bitmap)) {
 		error = xosspriteop_save_sprite_file(osspriteop_USER_AREA,
-						     (bitmap->sprite_area), path);
+				(bitmap->sprite_area), path);
 		if (error) {
 			LOG(("xosspriteop_save_sprite_file: 0x%x: %s",
 					error->errnum, error->errmess));
@@ -619,8 +618,8 @@
 		return true;
 	} else {
 		/* to make the saved sprite useful we must convert from 'Tinct'
-		   format to either a bi-level mask or a Select-style full
-		   alpha channel */
+		 * format to either a bi-level mask or a Select-style full
+		 * alpha channel */
 		osspriteop_area *area = bitmap->sprite_area;
 		osspriteop_header *hdr = (osspriteop_header*)((char*)area+area->first);
 		unsigned width = hdr->width + 1, height = hdr->height + 1;




More information about the netsurf-commits mailing list