Re: [AD] [BUG] ccolconv.c void * arith.

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Saturday 02 April 2005 09:48, Thomas Fjellstrom wrote:
> all throughout ccolconv.c it does stuff similar to that, arith on a void 
> pointer.

Does it make sense to apply the attached patch to get rid of void pointer 
arithmatic?
Peter's message suggests to me that it would.

Evert
Index: src/misc/ccolconv.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/misc/ccolconv.c,v
retrieving revision 1.3
diff -u -r1.3 ccolconv.c
--- src/misc/ccolconv.c	19 Mar 2005 11:15:06 -0000	1.3
+++ src/misc/ccolconv.c	7 Apr 2005 15:02:20 -0000
@@ -33,8 +33,8 @@
 
 void _colorconv_blit_8_to_8(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -101,8 +101,8 @@
 
 void _colorconv_blit_8_to_16(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -166,8 +166,8 @@
 
 void _colorconv_blit_8_to_24(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -232,8 +232,8 @@
 
 void _colorconv_blit_8_to_32(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -306,8 +306,8 @@
 
 void _colorconv_blit_15_to_8(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -357,8 +357,8 @@
 
 void _colorconv_blit_15_to_16(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -395,8 +395,8 @@
 
 void _colorconv_blit_15_to_24(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -464,8 +464,8 @@
 
 void _colorconv_blit_15_to_32(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -509,8 +509,8 @@
 
 void _colorconv_blit_16_to_8(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -562,8 +562,8 @@
 
 void _colorconv_blit_16_to_15(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -618,8 +618,8 @@
 
 static void colorconv_blit_true_to_8(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect, int bpp)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -646,8 +646,8 @@
 
 static void colorconv_blit_true_to_15(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect, int bpp)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -705,8 +705,8 @@
 
 static void colorconv_blit_true_to_16(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect, int bpp)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -789,8 +789,8 @@
 
 void _colorconv_blit_24_to_32(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -847,8 +847,8 @@
 
 void _colorconv_blit_32_to_24(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;
@@ -888,8 +888,8 @@
 
 static void colorcopy(struct GRAPHICS_RECT *src_rect, struct GRAPHICS_RECT *dest_rect, int bpp)
 {
-   void *src;
-   void *dest;
+   unsigned char *src;
+   unsigned char *dest;
    int width;
    int src_feed;
    int dest_feed;


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/